[OpenWrt-Devel] [PATCH] hostapd: add default value to eapol_version (#20641)

Hannu Nyman hannu.nyman at iki.fi
Mon Nov 2 06:32:29 EST 2015


r46861 introduced a new option eapol_version to hostapd, but did not
provide a default value. When the option value is evaluated,
the non-existing value causes errors to the systen log:
"netifd: radio0: sh: out of range"

Add a no-op default value 0 for eapol_version. Only values 1 or 2 are
actually passed on, so 0 will not change the default action in hostapd.

Signed-off-by: Hannu Nyman <hannu.nyman at iki.fi>
---

References:
https://dev.openwrt.org/changeset/46861/
https://dev.openwrt.org/ticket/20641

Error message:
Mon Nov  2 12:34:14 2015 daemon.notice netifd: radio0 (6249): sh: out of range
Mon Nov  2 12:34:14 2015 daemon.notice netifd: radio1 (6259): sh: out of range
Mon Nov  2 12:34:14 2015 daemon.notice netifd: radio0 (6249): Configuration file: /var/run/hostapd-phy0.conf

Comparison causing the error:
 [ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" ] &&
       append bss_conf "eapol_version=$eapol_version" "$N"


 package/network/services/hostapd/files/netifd.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index bdfcbb2..9b40a23 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -194,6 +194,7 @@ hostapd_set_bss_options() {
 	set_default hidden 0
 	set_default wmm 1
 	set_default uapsd 1
+	set_default eapol_version 0
 
 	append bss_conf "ctrl_interface=/var/run/hostapd"
 	if [ "$isolate" -gt 0 ]; then
-- 
2.5.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list