1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add MPTCP upstream support

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-08-30 21:51:02 +02:00
parent f7db294857
commit d2d21d7d68
8 changed files with 137 additions and 64 deletions

View file

@ -210,13 +210,23 @@ function mptcp_monitor_data()
luci.http.prepare_content("text/plain")
local fullmesh
fullmesh = io.popen("cat /proc/net/mptcp_net/snmp")
if fullmesh then
if fullmesh:read() ~= nil then
while true do
local ln = fullmesh:read("*l")
if not ln then break end
luci.http.write(ln)
luci.http.write("\n")
end
else
fullmesh = io.popen("nstat -z")
if fullmesh then
while true do
local ln = fullmesh:read("*l")
if not ln then break end
luci.http.write(ln)
luci.http.write("\n")
end
end
end
return
end
@ -225,7 +235,7 @@ function mptcp_connections_data()
luci.http.prepare_content("text/plain")
local connections
connections = io.popen("multipath -c")
if connections then
if connections:read() ~= nil then
while true do
local ln = connections:read("*l")
if not ln then break end