summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-03 08:07:32 +0200
committerGitHub <noreply@github.com>2018-07-03 08:07:32 +0200
commit9f2672f2cc0f07ef9ea431bd9294036df2bed7c9 (patch)
treeb61f155d8c7f4c20a22a1aa2bab860b443195214
parent1510111fa00ae343b87ee8e8a42145329bc8c2f0 (diff)
parentb0486ab5dc6917d05b0cab2930906e001c3b3179 (diff)
Merge pull request #1929 from pleasantone/mwan3_interface_aliases
luci-app-mwan3: fix aliased interfaces (@wan6)
-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