From f4adb66772100148ae128e9006cfaa39e769ea96 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 24 Jan 2021 19:05:35 +0100 Subject: [PATCH] gluon-web-private-wifi: define ifname for WAN radio Set the ifname for the WAN radio (Private WLAN) to wanX, X being the radio index. All other radios created by Gluon already have their ifname defined following this pattern. Signed-off-by: David Bauer --- .../luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua index b3d98ae8..a3b80432 100644 --- a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua +++ b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua @@ -49,6 +49,7 @@ mfp.default = uci:get('wireless', primary_iface, 'ieee80211w') or "0" function f:write() wireless.foreach_radio(uci, function(radio, index) local radio_name = radio['.name'] + local suffix = radio_name:match('^radio(%d+)$') local name = "wan_" .. radio_name if enabled.data then @@ -62,6 +63,7 @@ function f:write() ssid = ssid.data, key = key.data, macaddr = macaddr, + ifname = suffix and 'wan' .. suffix, disabled = false, })