mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix MPTCP bandwidth graph in some case
This commit is contained in:
parent
1400f7b0aa
commit
495d658f29
2 changed files with 26 additions and 7 deletions
|
@ -40,6 +40,9 @@ function multipath_bandwidth()
|
|||
|
||||
uci:foreach("network", "interface", function(s)
|
||||
local dev = s["ifname"] or ""
|
||||
if dev == "" then
|
||||
dev = get_device(s["ifname"])
|
||||
end
|
||||
if dev ~= "lo" and dev ~= "" then
|
||||
local multipath = s["multipath"] or "off"
|
||||
if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then
|
||||
|
@ -59,7 +62,11 @@ end
|
|||
|
||||
function get_device(interface)
|
||||
local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {})
|
||||
return dump['l3_device']
|
||||
if dump then
|
||||
return dump['l3_device']
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
function mptcp_check_trace(iface)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue