]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Do not include P2P IE in association request to non-P2P AP
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 17 Feb 2012 09:34:56 +0000 (11:34 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 17 Feb 2012 09:34:56 +0000 (11:34 +0200)
This was previously fixed for most cases in commit
ffad8858370e297b22ff5d9e6e36372755364ec0, but the check here for
drivers that implement SME/MLME was missed in that commit.

This removes the P2P IE from (Re)Association Request frame with
drivers that do not use wpa_supplicant SME implementation and are
P2P cabable when associating with a non-P2P AP (i.e., not a GO or
P2P WLAN manager AP).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1

wpa_supplicant/wpa_supplicant.c

index b58e2fdd89dbd5a247fb0f73ed32dca6f48b1297..caf90996d8ebec5233616aada83fd040774293a4 100644 (file)
@@ -1248,11 +1248,10 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
                u8 *pos;
                size_t len;
                int res;
-               int p2p_group;
-               p2p_group = wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE;
                pos = wpa_ie + wpa_ie_len;
                len = sizeof(wpa_ie) - wpa_ie_len;
-               res = wpas_p2p_assoc_req_ie(wpa_s, bss, pos, len, p2p_group);
+               res = wpas_p2p_assoc_req_ie(wpa_s, bss, pos, len,
+                                           ssid->p2p_group);
                if (res >= 0)
                        wpa_ie_len += res;
        }