From b0486ab5dc6917d05b0cab2930906e001c3b3179 Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Mon, 2 Jul 2018 16:45:10 -0700 Subject: [PATCH] luci-app-mwan3: fix aliased interfaces (@wan6) --- applications/luci-app-mwan3/luasrc/controller/mwan3.lua | 6 ++++-- 1 file 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 -- 2.30.2