Przeglądaj źródła

hostapd: change wpa_supplicant.sh to pass 64 byte hex psk unquoted and remove the undocumented usepasspharse option, this makes it match the logic of the hostapd setup

SVN-Revision: 32614
Jo-Philipp Wich 13 lat temu
rodzic
commit
17f5287b0e
1 zmienionych plików z 3 dodań i 4 usunięć
  1. 3 4
      package/hostapd/files/wpa_supplicant.sh

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

@@ -63,11 +63,10 @@ wpa_supplicant_setup_vif() {
 				key_mgmt='WPA-NONE'
 				driver='wext'
 			}
-			config_get_bool usepassphrase "$vif" usepassphrase 1
-			if [ "$usepassphrase" = "1" ]; then
-				passphrase="psk=\"${key}\""
-			else
+			if [ ${#key} -eq 64 ]; then
 				passphrase="psk=${key}"
+			else
+				passphrase="psk=\"${key}\""
 			fi
 			case "$enc" in
 				*psk2*)