A WPA(2) pre-shared key can either be specified as a 8 to 63 character passphrase...
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 26 Aug 2008 17:19:00 +0000 (17:19 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 26 Aug 2008 17:19:00 +0000 (17:19 +0000)
Signed-off-by: thomas@archlinux.org
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12394 3c298f89-4303-0410-b956-a3cf2f4a3e73

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.030023 seconds and 4 git commands to generate.