luci-app-mwan3: fix aliased interfaces (@wan6)
This commit is contained in:
parent
1510111fa0
commit
b0486ab5dc
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue