summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
diff options
context:
space:
mode:
authorPaul Traina <mail@github.st.pst.org>2018-07-02 16:45:10 -0700
committerPaul Traina <mail@github.st.pst.org>2018-07-02 16:45:10 -0700
commitb0486ab5dc6917d05b0cab2930906e001c3b3179 (patch)
treeb61f155d8c7f4c20a22a1aa2bab860b443195214 /applications/luci-app-mwan3/luasrc/controller/mwan3.lua
parent1510111fa00ae343b87ee8e8a42145329bc8c2f0 (diff)
luci-app-mwan3: fix aliased interfaces (@wan6)
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/controller/mwan3.lua')
-rw-r--r--applications/luci-app-mwan3/luasrc/controller/mwan3.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua
index 18c2135e43..2d46953e55 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