]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Convert WPA/TKIP-only to WPA+WPA2 mixed mode credential
authorJouni Malinen <jouni@codeaurora.org>
Fri, 17 Apr 2020 19:05:07 +0000 (22:05 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 17 Apr 2020 20:51:58 +0000 (23:51 +0300)
This case of accepting WPA/TKIP-only credential based on internal
registrar request to configure an AP to use TKIP was still remaining
while all the WPS cases were supposed to enable mixed mode
automatically. This is bit of a corner case since this is based on
explicit local request to configure TKIP, but anyway, convert this one
as well to allow WPA2/CCMP to be used.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/wps_supplicant.c

index d34e059a83fd5f0d6707a1b7f07036645af5ec7a..b160fd0d406122a00e4292751baeb77906503cc8 100644 (file)
@@ -484,7 +484,7 @@ static int wpa_supplicant_wps_cred(void *ctx,
        case WPS_ENCR_NONE:
                break;
        case WPS_ENCR_TKIP:
-               ssid->pairwise_cipher = WPA_CIPHER_TKIP;
+               ssid->pairwise_cipher = WPA_CIPHER_TKIP | WPA_CIPHER_CCMP;
                break;
        case WPS_ENCR_AES:
                ssid->pairwise_cipher = WPA_CIPHER_CCMP;
@@ -525,7 +525,7 @@ static int wpa_supplicant_wps_cred(void *ctx,
        case WPS_AUTH_WPAPSK:
                ssid->auth_alg = WPA_AUTH_ALG_OPEN;
                ssid->key_mgmt = WPA_KEY_MGMT_PSK;
-               ssid->proto = WPA_PROTO_WPA;
+               ssid->proto = WPA_PROTO_WPA | WPA_PROTO_RSN;
                break;
        case WPS_AUTH_WPA2PSK:
                ssid->auth_alg = WPA_AUTH_ALG_OPEN;