aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-12-16 12:53:05 +0100
committerFelix Fietkau <nbd@nbd.name>2022-12-16 14:32:47 +0100
commitc2fde432b3de2d0e153e436f1b7e3f64542e5edc (patch)
treeb92d6823f07d6c149e23d640e5030adfa7035c8d /package
parent133a1e2f3787ec995561398bda7571180598454f (diff)
downloadupstream-c2fde432b3de2d0e153e436f1b7e3f64542e5edc.tar.gz
upstream-c2fde432b3de2d0e153e436f1b7e3f64542e5edc.tar.bz2
upstream-c2fde432b3de2d0e153e436f1b7e3f64542e5edc.zip
hostapd: always set a default for the nas identifier
It is used for both 802.11r and WPA enterprise. Setting it when not needed is harmless Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/network/services/hostapd/files/hostapd.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index eabfb21a9f..b165995d9f 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -611,7 +611,9 @@ hostapd_set_bss_options() {
[ -n "$wpa_strict_rekey" ] && append bss_conf "wpa_strict_rekey=$wpa_strict_rekey" "$N"
}
- [ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
+ set_default nasid "${macaddr//\:}"
+ append bss_conf "nas_identifier=$nasid" "$N"
+
[ -n "$acct_server" ] && {
append bss_conf "acct_server_addr=$acct_server" "$N"
append bss_conf "acct_server_port=$acct_port" "$N"
@@ -912,7 +914,6 @@ hostapd_set_bss_options() {
append bss_conf "ft_psk_generate_local=$ft_psk_generate_local" "$N"
append bss_conf "ft_over_ds=$ft_over_ds" "$N"
append bss_conf "reassociation_deadline=$reassociation_deadline" "$N"
- [ -n "$nasid" ] || append bss_conf "nas_identifier=${macaddr//\:}" "$N"
if [ "$ft_psk_generate_local" -eq "0" ]; then
json_get_vars r0_key_lifetime r1_key_holder pmk_r1_push