From: Paul Traina Date: Mon, 2 Jul 2018 23:45:10 +0000 (-0700) Subject: luci-app-mwan3: fix aliased interfaces (@wan6) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b0486ab5dc6917d05b0cab2930906e001c3b3179;p=oweals%2Fluci.git luci-app-mwan3: fix aliased interfaces (@wan6) --- diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua index 18c2135e4..2d46953e5 100644 --- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua +++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua @@ -138,10 +138,12 @@ function diagnosticsData(interface, task) local number = getInterfaceNumber(interface) local uci = require "luci.model.uci".cursor(nil, "/var/state") - local device = uci:get("network", interface, "ifname") + local nw = require "luci.model.network".init() + local network = nw:get_network(interface) + local device = network and network:ifname() luci.http.prepare_content("text/plain") - if device ~= "" then + if device then if task == "ping_gateway" then local gateway = get_gateway(interface) if gateway ~= nil then