Skip to content

Commit

Permalink
hostapd: always set a default for the nas identifier
Browse files Browse the repository at this point in the history
It is used for both 802.11r and WPA enterprise.
Setting it when not needed is harmless

Signed-off-by: Felix Fietkau <[email protected]>
(cherry picked from commit c2fde432b3de2d0e153e436f1b7e3f64542e5edc)
  • Loading branch information
nbd168 authored and 1715173329 committed Dec 24, 2022
1 parent 5e7d352 commit d60de19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package/network/services/hostapd/files/hostapd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,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"
Expand Down Expand Up @@ -915,7 +917,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
Expand Down

0 comments on commit d60de19

Please sign in to comment.