diff --git a/debian/changelog b/debian/changelog index ff804df..18cddb4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +omr-vps-admin (0.11+20240629) unstable; urgency=medium + + * Add a timeout on ss -M command + + -- OpenMPTCProuter Sat, 29 Jun 2024 06:55:12 +0200 + omr-vps-admin (0.11+20240625) unstable; urgency=medium * Add memory, hard disk and CPU usage in status endpoint diff --git a/omr-admin.py b/omr-admin.py index 191d129..a224469 100755 --- a/omr-admin.py +++ b/omr-admin.py @@ -1336,7 +1336,7 @@ async def mptcpsupport(request: Request): with open('/proc/net/mptcp_net/mptcp') as f: if iptohex in f.read(): return {"mptcp": "working"} - elif not os.popen("ss -M | grep " + ip) == '': + elif not os.popen("timeout 2 ss -M | grep " + ip) == '': return {"mptcp": "working"} return {"mptcp": "not working"}