WPS (with WPA2) using wpa_supplicant0.6.10

Pragya Gupta contactpg
Fri Dec 10 02:03:36 PST 2010


Hi,

I am trying to connect to a linksys AP (WRT54G2) using WPS PIN
mechanism. I am using wpa_cli over wpa_supplicant0.6.10 . While the
connection is successful when the security is set to WPA-Personal on
AP, I see a failure when the security is WPA2-Personal.

I am issuing the following command:
wps_pin <bssid>

While investigating the failure, I came across some code in
wpa_supplicant which has confused me a bit.

The function "wpa_driver_wext_associate" in Driver_Wext.c sets the
WPA_VERSION based on following check:

if (params->wpa_ie == NULL || params->wpa_ie_len == 0)
		value = IW_AUTH_WPA_VERSION_DISABLED;
else if (params->wpa_ie[0] == WLAN_EID_RSN)
		value = IW_AUTH_WPA_VERSION_WPA2;
else
		value = IW_AUTH_WPA_VERSION_WPA;


I observed that this value was always set to IW_AUTH_WPA_VERSION_WPA
as params->wpa_ie[0] = 221 (WLAN_EID_VENDOR_SPECIFIC).

On further investigation, I observed that wpa_ie was set to
WLAN_EID_VENDOR_SPECIFIC in function wps_build_assoc_req_ie (wps.c)
called from wpa_supplicant_associate . In such a case how will the
condition "params->wpa_ie[0] == WLAN_EID_RSN " be true ? If my
understanding is correct, the value of WPA_VERSION would not be set
correctly when security is WPA2 on AP.

Looks like I am missing something. Can anybody help me with this ?


-- 
Pragya



More information about the Hostap mailing list