forked from zentralwerk/network
ap: add explicit ifname for ssids of duplicate nets
This commit is contained in:
parent
0002456abf
commit
70f63609f6
|
@ -1159,7 +1159,7 @@
|
|||
htmode = "VHT80";
|
||||
ssids = {
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
@ -1197,7 +1197,7 @@
|
|||
htmode = "VHT80";
|
||||
ssids = {
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
@ -1238,7 +1238,7 @@
|
|||
ssids = {
|
||||
EWW = { net = "priv36"; };
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
@ -1276,7 +1276,7 @@
|
|||
htmode = "VHT80";
|
||||
ssids = {
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
@ -1314,7 +1314,7 @@
|
|||
htmode = "VHT80";
|
||||
ssids = {
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
@ -1352,7 +1352,7 @@
|
|||
htmode = "VHT80";
|
||||
ssids = {
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
@ -1424,7 +1424,7 @@
|
|||
htmode = "VHT80";
|
||||
ssids = {
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
@ -1502,7 +1502,7 @@
|
|||
htmode = "VHT80";
|
||||
ssids = {
|
||||
"ZW public" = { net = "pub"; encryption = "none"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; };
|
||||
"Datenspuren" = { net = "pub"; encryption = "owe"; ifname = "wlan5-owe"; };
|
||||
"ZW stage" = { net = "priv25"; };
|
||||
};
|
||||
};
|
||||
|
|
|
@ -462,6 +462,10 @@ let
|
|||
type = enum [ "ap" "sta" ];
|
||||
default = "ap";
|
||||
};
|
||||
ifname = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
|
|
@ -265,16 +265,23 @@ in
|
|||
${concatMapStrings (ssid:
|
||||
let
|
||||
ssidConfig = radioConfig.ssids.${ssid};
|
||||
|
||||
# mapping our option to openwrt/hostapd setting
|
||||
encryption = {
|
||||
none = "none";
|
||||
owe = "owe";
|
||||
wpa2 = "psk2";
|
||||
wpa3 = "sae-mixed";
|
||||
}.${radioConfig.ssids.${ssid}.encryption};
|
||||
}.${ssidConfig.encryption};
|
||||
|
||||
ifname =
|
||||
if ssidConfig.ifname != null
|
||||
then ssidConfig.ifname
|
||||
else "${ifPrefix}-${ssidConfig.net}";
|
||||
|
||||
in ''
|
||||
uci add wireless wifi-iface
|
||||
uci set wireless.@wifi-iface[-1].ifname=${ifPrefix}-${ssidConfig.net}
|
||||
uci set wireless.@wifi-iface[-1].ifname=${ifname}
|
||||
uci set wireless.@wifi-iface[-1].device=radio${toString index}
|
||||
uci set wireless.@wifi-iface[-1].ssid='${ssid}'
|
||||
uci set wireless.@wifi-iface[-1].mode=${ssidConfig.mode}
|
||||
|
|
Loading…
Reference in New Issue