Issue in network selection, when dynamically changing AP from WEP toWPA2 personal

Klouz, AymenX aymenx.klouz
Fri Sep 20 02:42:42 PDT 2013


Hi All,

I encountered a special issue from supplicant when it is already connected to an AP that switch dynamically from WEP to WPA.

Here is the steps to reproduce :

- Clear all the registered networks

- Connect to a WEP access point
    Useful Trace :
    I/WifiHW  (  442): REPLY: ====
    I/WifiHW  (  442): REPLY: bssid=c8:4c:75:20:c0:6c
    I/WifiHW  (  442): REPLY: freq=2462
    I/WifiHW  (  442): REPLY: flags=[WEP][ESS]
    I/WifiHW  (  442): REPLY: ssid=CWS4400
    I/WifiHW  (  442): REPLY: ====
    D/wpa_supplicant( 7635): wlan0: 9: c8:4c:75:20:c0:6c ssid='CWS4400' wpa_ie_len=0 rsn_ie_len=0 caps=0x411 level=-52
    D/wpa_supplicant( 7635): wlan0:    allow in non-WPA/WPA2
    D/wpa_supplicant( 7635): wlan0:    selected BSS c8:4c:75:20:c0:6c ssid='CWS4400'

- After connecting, switch the AP to WPA

- A disconnection from the WEP network is observed, then BSSID is added into blacklist
    Useful Trace :
    I/wpa_supplicant( 7635): wlan0: CTRL-EVENT-DISCONNECTED bssid=c8:4c:75:20:c0:6c reason=0
    D/wpa_supplicant( 7635): Added BSSID c8:4c:75:20:c0:6c into blacklist

- A New Network is available, with the same bssid, ssid etc ... but different security flags
    Useful Trace :
    I/WifiHW  (  442): REPLY: ====
    I/WifiHW  (  442): REPLY: bssid=c8:4c:75:20:c0:6c
    I/WifiHW  (  442): REPLY: freq=2462
    I/WifiHW  (  442): REPLY: flags=[WPA-PSK-TKIP][ESS]
    I/WifiHW  (  442): REPLY: ssid=CWS4400
    I/WifiHW  (  442): REPLY: ====

- The supplicant tries to connect to a new network but no one is registered except the one that is already blacklisted, so it tries to clear the network from blacklist and try to reconnect to it
    Useful Trace :
    D/wpa_supplicant( 7635): wlan0: No APs found - clear blacklist and try again
    D/wpa_supplicant( 7635): Removed BSSID c8:4c:75:20:c0:6c from blacklist (clear)
    D/wpa_supplicant( 7635): wlan0: Selecting BSS from priority group 1
    D/wpa_supplicant( 7635): wlan0: 0: c8:4c:75:20:c0:6c ssid='CWS4400' wpa_ie_len=22 rsn_ie_len=0 caps=0x411 level=-50
    D/wpa_supplicant( 7635): wlan0:    skip WPA IE - key mgmt mismatch
    D/wpa_supplicant( 7635): wlan0:    allow in non-WPA/WPA2
    D/wpa_supplicant( 7635): wlan0:    selected BSS c8:4c:75:20:c0:6c ssid='CWS4400'
    D/wpa_supplicant( 7635): wlan0: Request association: reassociate: 1  selected: c8:4c:75:20:c0:6c  bssid: 00:00:00:00:00:00                          pending: 00:00:00:00:00:00  wpa_state: SCANNING
    I/wpa_supplicant( 7635): wlan0: Trying to associate with c8:4c:75:20:c0:6c (SSID='CWS4400' freq=2462 MHz)
    D/wpa_supplicant( 7635): wlan0: Event ASSOC_REJECT (13) received
    I/wpa_supplicant( 7635): wlan0: CTRL-EVENT-ASSOC-REJECT bssid=c8:4c:75:20:c0:6c status_code=12
    E/wpa_supplicant( 7635): Retrying assoc: 2

--> From the trace we can see that the supplicant does not make difference between the new network (WPA) and the old registered one (WEP). It tries then to reassociate for 10 times although it is not dealing with the same network. A patch that add a key mgmt mismatch flag when trying to connect to a WPA network with WEP secutiry settings would prevent such an issue. Please refer to the attached patch.

Could you please confirm the issue and the fix ?

Best regards,

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue.patch
Type: text/x-patch
Size: 1836 bytes
Desc: issue.patch
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20130920/fe1e452e/attachment.bin>



More information about the Hostap mailing list