luci-app-mwan3: fix aliased interfaces (@wan6)

This commit is contained in:
Paul Traina 2018-07-02 16:45:10 -07:00
parent 1510111fa0
commit b0486ab5dc

View file

@ -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