hostapd: fix stray "out of range" shell errors in hostapd.sh
The hostapd_append_wpa_key_mgmt() procedure uses the possibly uninitialized $ieee80211r and $ieee80211w variables in a numerical comparisation, leading to stray "netifd: radio0 (0000): sh: out of range" errors in logread when WPA-PSK security is enabled. Ensure that those variables are substituted with a default value in order to avoid emitting this (harmless) shell error. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
6699f58fdb
commit
633c35aaa4
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hostapd
|
PKG_NAME:=hostapd
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
|
|
@ -40,8 +40,8 @@ hostapd_append_wpa_key_mgmt() {
|
||||||
local auth_type="$(echo $auth_type | tr 'a-z' 'A-Z')"
|
local auth_type="$(echo $auth_type | tr 'a-z' 'A-Z')"
|
||||||
|
|
||||||
append wpa_key_mgmt "WPA-$auth_type"
|
append wpa_key_mgmt "WPA-$auth_type"
|
||||||
[ "$ieee80211r" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type}"
|
[ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type}"
|
||||||
[ "$ieee80211w" -gt 0 ] && append wpa_key_mgmt "WPA-${auth_type}-SHA256"
|
[ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-${auth_type}-SHA256"
|
||||||
}
|
}
|
||||||
|
|
||||||
hostapd_add_log_config() {
|
hostapd_add_log_config() {
|
||||||
|
|
Loading…
Reference in a new issue