diff options
author | Florian Eckert <fe@dev.tdt.de> | 2018-01-19 09:49:46 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2018-01-23 13:30:24 +0100 |
commit | 562a3e5b73c16dd5bdcf381aa96606b5ce2c01c4 (patch) | |
tree | f1a62fb51cac0abae78788dd8991cf7170515e2f /applications/luci-app-mwan3/luasrc/controller/mwan3.lua | |
parent | 4dddecfa93ef24741d4d5e9adff757f0250b0f67 (diff) |
luci-app-mwan3: fix assert if route could not select by ubus
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/controller/mwan3.lua')
-rw-r--r-- | applications/luci-app-mwan3/luasrc/controller/mwan3.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua index cf5708051..5249d4e22 100644 --- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua +++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua @@ -111,11 +111,11 @@ function diagnosticsData(interface, task) function get_gateway(inteface) local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {}) local gateway - if dump then + if dump and dump.route then local _, route for _, route in ipairs(dump.route) do if dump.route[_].target == "0.0.0.0" then - gateway = dump.route[_].nexthop + gateway = dump.route[_].nexthop end end end |