diff mbox

[OpenWrt-Devel] This patch fixes a line that appears to clear beacon_int variable, prevent setting beacon interval for adhoc.

Message ID 1435617679-10695-1-git-send-email-ben@gowasabi.net
State Rejected
Headers show

Commit Message

ben June 29, 2015, 10:41 p.m. UTC
Signed-off-by: ben <ben@gowasabi.net>
---
 package/network/services/hostapd/files/netifd.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bastian Bittorf June 30, 2015, 8:32 a.m. UTC | #1
* ben <ben@gowasabi.net> [30.06.2015 06:48]:
> Signed-off-by: ben <ben@gowasabi.net>
> ---
>  package/network/services/hostapd/files/netifd.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
> index 23d2e7e..f148544 100644
> --- a/package/network/services/hostapd/files/netifd.sh
> +++ b/package/network/services/hostapd/files/netifd.sh
> @@ -632,7 +632,7 @@ wpa_supplicant_add_network() {
>  			;;
>  		esac
>  	}
> -	local beacon_int brates mrate
> +	local brates mrate
>  	[ -n "$bssid" ] && append network_data "bssid=$bssid" "$N$T"
>  	[ -n "$beacon_int" ] && append network_data "beacon_int=$beacon_int" "$N$T"

this is a bug only for busybox 1.22.1
http://lists.busybox.net/pipermail/busybox/2015-April/082780.html

beside this:
we should take more care in the shellscripts, so that local vars
are 'lowercase' and global vars are 'UPPERCASE'. thus it should read e.g.:

hostapd_prepare_device_config()
{
  ...
  local country country_ie beacon_int doth require_mode
  json_get_vars country country_ie beacon_int doth require_mode
  ...
}

are doesnt this work and 'json_get_vars' is always global?

bye, bastian
diff mbox

Patch

diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 23d2e7e..f148544 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -632,7 +632,7 @@  wpa_supplicant_add_network() {
 			;;
 		esac
 	}
-	local beacon_int brates mrate
+	local brates mrate
 	[ -n "$bssid" ] && append network_data "bssid=$bssid" "$N$T"
 	[ -n "$beacon_int" ] && append network_data "beacon_int=$beacon_int" "$N$T"