diff options
author | Stijn Tintel <stijn@linux-ipv6.be> | 2020-11-26 02:04:02 +0200 |
---|---|---|
committer | Stijn Tintel <stijn@linux-ipv6.be> | 2020-11-26 02:25:23 +0200 |
commit | 26c26e11a2131e3e07a9322c9bea6dcc107cddad (patch) | |
tree | 3417e943b9f42550794cec816ad887569756e8ec | |
parent | c5ea37af7e4ce681c93c8b727a7fdf1f795db0ed (diff) | |
download | upstream-26c26e11a2131e3e07a9322c9bea6dcc107cddad.tar.gz upstream-26c26e11a2131e3e07a9322c9bea6dcc107cddad.tar.bz2 upstream-26c26e11a2131e3e07a9322c9bea6dcc107cddad.zip |
hostapd: fix "sh: out of range" errors
Several variables in hostapd.sh can be used uninitialized in numerical
comparisons, causing errors in logread:
netifd: radio24 (1668): sh: out of range
Set defaults for those variables to silence those errors.
Fixes: b518f07d4b8a ("hostapd: remove ieee80211v option")
Fixes: cc80cf53c50d ("hostapd: add FTM responder support")
Fixes: e66bd0eb0469 ("hostapd: make rrm report independent of ieee80211k setting")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
-rw-r--r-- | package/network/services/hostapd/files/hostapd.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 4d4a75b2dd..5f45ba2e26 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -657,6 +657,8 @@ hostapd_set_bss_options() { } json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition + set_default bss_transition 0 + set_default wnm_sleep_mode 0 [ -n "$time_advertisement" ] && append bss_conf "time_advertisement=$time_advertisement" "$N" [ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N" @@ -668,13 +670,18 @@ hostapd_set_bss_options() { if [ "$ieee80211k" -eq "1" ]; then set_default rrm_neighbor_report 1 set_default rrm_beacon_report 1 + else + set_default rrm_neighbor_report 0 + set_default rrm_beacon_report 0 fi [ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N" [ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N" json_get_vars ftm_responder stationary_ap lci civic + set_default ftm_responder 0 if [ "$ftm_responder" -eq "1" ]; then + set_default stationary_ap 0 iw phy "$phy" info | grep -q "ENABLE_FTM_RESPONDER" && { append bss_conf "ftm_responder=1" "$N" [ "$stationary_ap" -eq "1" ] && append bss_conf "stationary_ap=1" "$N" |