A WPA(2) pre-shared key can either be specified as a 8 to 63 character passphrase...
[openwrt.git] / package / hostapd / files / hostapd.sh
index 147736b..49b30cf 100644 (file)
@@ -39,7 +39,11 @@ hostapd_setup_vif() {
        case "$enc" in
                *psk*|*PSK*)
                        config_get psk "$vif" key
-                       append hostapd_cfg "wpa_passphrase=$psk" "$N"
+                       if [ ${#psk} -eq 64 ]; then
+                               append hostapd_cfg "wpa_psk=$psk" "$N"
+                       else
+                               append hostapd_cfg "wpa_passphrase=$psk" "$N"
+                       fi
                ;;
                *wpa*|*WPA*)
                        # required fields? formats?
This page took 0.033978 seconds and 4 git commands to generate.