]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/system/wlanclient
wlanclient: Do not force using legacy interface to talk to the kernel
[ipfire-2.x.git] / src / initscripts / system / wlanclient
index b32a4cb4acada5a7fc1c96d589c7b353ae2fc6b0..338a743ab72e4ad69efcb4780116d8d71e1807cc 100644 (file)
@@ -86,6 +86,7 @@ function wpa_supplicant_config_line() {
        local config=${2}
        shift 2
 
+       local ieee80211w
        local anonymous_identity
        local auth_alg
        local auth_mode
@@ -142,17 +143,22 @@ function wpa_supplicant_config_line() {
 
        case "${mode}" in
                EAP)
-                       key_mgmt="WPA-EAP"
+                       key_mgmt="WPA-EAP-SHA256 WPA-EAP"
+                       ;;
+               WPA3)
+                       key_mgmt="SAE"
+
+                       ieee80211w="2"
                        ;;
                WPA2)
                        auth_alg="OPEN"
                        proto="RSN"
-                       key_mgmt="WPA-PSK"
+                       key_mgmt="WPA-PSK-SHA256 WPA-PSK"
                        ;;
                WPA)
                        auth_alg="OPEN"
                        proto="WPA"
-                       key_mgmt="WPA-PSK"
+                       key_mgmt="WPA-PSK-SHA256 WPA-PSK"
                        ;;
                WEP)
                        auth_alg="SHARED"
@@ -209,7 +215,11 @@ function wpa_supplicant_config_line() {
                        echo "  key_mgmt=${key_mgmt}"
                fi
                if [ -n "${psk}" ]; then
-                       echo "  psk=\"${psk}\""
+                       if [ "${key_mgmt}" = "SAE" ]; then
+                               echo "  sae_password=\"${psk}\""
+                       else
+                               echo "  psk=\"${psk}\""
+                       fi
                fi
                if [ -n "${wep_tx_keyidx}" ]; then
                        echo "  wep_tx_keyidx=${wep_tx_keyidx}"
@@ -227,6 +237,9 @@ function wpa_supplicant_config_line() {
                if [ -n "${priority}" ]; then
                        echo "  priority=${priority}"
                fi
+               if [ -n "${ieee80211w}" ]; then
+                       echo "  ieee80211w=${ieee80211w}"
+               fi
 
                # EAP
                if [ "${mode}" = "EAP" ]; then
@@ -262,9 +275,7 @@ function wpa_supplicant_start() {
        # Build wpa_supplicant command line.
        local wpa_suppl_cmd="wpa_supplicant -B -qqq -i${device} -c${config}"
 
-       if device_is_wireless ${device}; then
-               wpa_suppl_cmd="${wpa_suppl_cmd} -Dwext"
-       else
+       if ! device_is_wireless ${device}; then
                wpa_suppl_cmd="${wpa_suppl_cmd} -Dwired"
        fi