Browse Source

hostapd: ensure that wpa_supplicant_setup_vif() returns success in cases where wpa_supplicant is not invoked (#11996)

SVN-Revision: 33674
Jo-Philipp Wich 13 years ago
parent
commit
ff1b163540
1 changed files with 4 additions and 1 deletions
  1. 4 1
      package/hostapd/files/wpa_supplicant.sh

+ 4 - 1
package/hostapd/files/wpa_supplicant.sh

@@ -191,6 +191,9 @@ network={
 	$wep_tx_keyidx
 }
 EOF
-	[ -z "$proto" -a "$key_mgmt" != "NONE" ] || \
+	if [ -n "$proto" -o "$key_mgmt" == "NONE" ]; then
 		wpa_supplicant ${bridge:+ -b $bridge} -B -P "/var/run/wifi-${ifname}.pid" -D ${driver:-wext} -i "$ifname" -c /var/run/wpa_supplicant-$ifname.conf $options
+	else
+		return 0
+	fi
 }