luci-app-mwan3: diagnostic fix physical device lookup
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 30 Aug 2018 07:04:48 +0000 (09:04 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 30 Aug 2018 12:44:58 +0000 (14:44 +0200)
Use diffrent function to get the physical interface name.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-mwan3/luasrc/controller/mwan3.lua

index 541d695ecfe04a710ef41ba7e232dca92673b7d0..5fa8d8a9194e6e65e8ecb6417a7a45192312ed00 100644 (file)
@@ -144,7 +144,8 @@ function diagnosticsData(interface, task)
        local uci = require "luci.model.uci".cursor(nil, "/var/state")
        local nw = require "luci.model.network".init()
        local network = nw:get_network(interface)
-       local device = network and network:ifname()
+       local device = network and network:get_interface()
+       device = device:name()
 
        luci.http.prepare_content("text/plain")
        if device then