Browse Source

Fix a bug when parsing ca_cert and eap_type with wpa_supplicant, this should only be set for 802.1x setups

SVN-Revision: 12292
Florian Fainelli 17 years ago
parent
commit
dbb59f014a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      package/wpa_supplicant/files/wpa_supplicant.sh

+ 4 - 3
package/wpa_supplicant/files/wpa_supplicant.sh

@@ -32,6 +32,7 @@ wpa_supplicant_setup_vif() {
 			proto='WPA2'
 			key_mgmt='WPA-EAP'
 			config_get ca_cert "$vif" ca_cert
+			ca_cert="ca_cert=\"$ca_cert\""
 			case "$eap_type" in
 				tls|TLS)
 					pairwise='pairwise=CCMP'
@@ -50,12 +51,12 @@ wpa_supplicant_setup_vif() {
 					password="password=\"$password\""
 				;;
 			esac
+			eap_type="eap_type=$(echo $eap_type | tr 'a-z' 'A-Z')"
 		;;
 	esac
 	config_get ifname "$vif" ifname
 	config_get bridge "$vif" bridge
 	config_get ssid "$vif" ssid
-	eap_type=$(echo $eap_type | tr 'a-z' 'A-Z')
 	cat > /var/run/wpa_supplicant-$ifname.conf <<EOF
 network={
 	scan_ssid=1
@@ -65,8 +66,8 @@ network={
 	$passphrase
 	$pairwise
 	$group
-	eap=$eap_type
-	ca_cert="$ca_cert"
+	$eap_type
+	$ca_cert
 	$priv_key
 	$priv_key_pwd
 	$phase2