]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix connect command to not claim WPA if WPS is used
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 9 Aug 2011 10:59:43 +0000 (13:59 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 9 Aug 2011 10:59:43 +0000 (13:59 +0300)
Such using params->wpa_ie to figure out whether the connection is for
WPA/WPA2 is not correct since that buffer is used also to add WPS IE. In
case of WPS, do not add NL80211_ATTR_WPA_VERSIONS to avoid confusing
drivers.

src/drivers/driver_nl80211.c

index 41b718d785acd088d5c332ccbf1723b689aab448..42551c34cac4b18a0be5e2ff2ce3bf6021c46afd 100644 (file)
@@ -4801,7 +4801,8 @@ static int wpa_driver_nl80211_connect(
        NLA_PUT_U32(msg, NL80211_ATTR_AUTH_TYPE, type);
 
 skip_auth_type:
-       if (params->wpa_ie && params->wpa_ie_len) {
+       if (params->wpa_ie && params->wpa_ie_len &&
+           params->key_mgmt_suite != KEY_MGMT_WPS) {
                enum nl80211_wpa_versions ver;
 
                if (params->wpa_ie[0] == WLAN_EID_RSN)