aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-12-16 13:33:58 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-12-16 13:33:58 +0000
commit7c2dbf40582bebd4b0ebbc6f358f04ea8439f090 (patch)
tree57e8ff8e0d4135ad475abb13c8431f552e4e6d42 /package/hostapd/files
parent0c392173db0fadfac0664d9fca7b1c65c7395a31 (diff)
downloadupstream-7c2dbf40582bebd4b0ebbc6f358f04ea8439f090.tar.gz
upstream-7c2dbf40582bebd4b0ebbc6f358f04ea8439f090.tar.bz2
upstream-7c2dbf40582bebd4b0ebbc6f358f04ea8439f090.zip
wpa_supplicant.sh: always use parameters from the current section
Using variables from the outer scope unnecessarily complicates the code and leads to issues. This patch fixes the bug when having an "adhoc" wifi-iface section before a "sta" section prevents wpa_supplicant from using the key specified in the corresponding section as it tries to use the "adhoc" key instead (1 by default). Signed-off-by: Paul Fertser <fercerpav@gmail.com> Backport of r34716 git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@34717 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd/files')
-rw-r--r--package/hostapd/files/wpa_supplicant.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/package/hostapd/files/wpa_supplicant.sh b/package/hostapd/files/wpa_supplicant.sh
index 5c4bd93d02..cdca9b5539 100644
--- a/package/hostapd/files/wpa_supplicant.sh
+++ b/package/hostapd/files/wpa_supplicant.sh
@@ -9,13 +9,8 @@ wpa_supplicant_setup_vif() {
local scan_ssid="1"
[ -n "$4" ] && freq="frequency=$4"
- # make sure we have the encryption type and the psk
- [ -n "$enc" ] || {
- config_get enc "$vif" encryption
- }
- [ -n "$key" ] || {
- config_get key "$vif" key
- }
+ config_get enc "$vif" encryption
+ config_get key "$vif" key
local net_cfg bridge
config_get bridge "$vif" bridge