From d4df42934a426a2acec628fa2f5507c07d765ebc Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 6 Feb 2021 08:56:44 +0100 Subject: [PATCH] Fix display when device have a . --- .../luasrc/view/openmptcprouter/wizard.htm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 8ddce55b0..5224df408 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -558,8 +558,13 @@ <% iffind=0 uciifname=uci:get("network",ifname,"ifname") - realifname=splitstring(uciifname,'.')[1] or "" - vlan=splitstring(uciifname,'.')[2] or "" + if uciifname:match("/") then + realifname=uciifname + vlan="" + else + realifname=splitstring(uciifname,'.')[1] or "" + vlan=splitstring(uciifname,'.')[2] or "" + end for _, ifacea in ipairs(ifaces) do if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then %>