From 15cc74c6b444d22ccfc4384465424edd6d3a718e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 18 Sep 2019 07:33:25 +0200 Subject: [PATCH] luci-mod-network: interfaces.js: derive status from layer 3 device Align the status column device selection logic with the approach used for rendering the interface status boxes; first try to obtain the active layer3 device as reported by ubus, only then fall back to the protocol specific device hint which might or might not point to an existing device. Fixes: #3076 Signed-off-by: Jo-Philipp Wich --- .../htdocs/luci-static/resources/view/network/interfaces.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index c79deea27a..624718dd84 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -65,7 +65,7 @@ function render_status(node, ifc, with_device) { ipaddrs = changecount ? [] : ifc.getIPAddrs(), ip6addrs = changecount ? [] : ifc.getIP6Addrs(), errors = ifc.getErrors(), - maindev = ifc.getDevice(), + maindev = ifc.getL3Device() || ifc.getDevice(), macaddr = maindev ? maindev.getMAC() : null; return L.itemlist(node, [ -- 2.30.2