Merge pull request #1929 from pleasantone/mwan3_interface_aliases

luci-app-mwan3: fix aliased interfaces (@wan6)
This commit is contained in:
Jo-Philipp Wich 2018-07-03 08:07:32 +02:00 committed by GitHub
commit 9f2672f2cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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