Skip to content

Commit

Permalink
Add a timeout on ss -M command
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jun 29, 2024
1 parent bb58cbc commit 1e36d2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
omr-vps-admin (0.11+20240629) unstable; urgency=medium

* Add a timeout on ss -M command

-- OpenMPTCProuter <[email protected]> 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
Expand Down
2 changes: 1 addition & 1 deletion omr-admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down

0 comments on commit 1e36d2a

Please sign in to comment.