wpa_supplicant + hostap -- won't associate with open APs.

Bjørn Mork bjorn
Fri Jan 7 01:39:21 PST 2005


Jouni Malinen <jkmaline at cc.hut.fi> writes:
> On Sat, Dec 18, 2004 at 08:01:32PM -0500, Tony Espy wrote:
>
>> I think I may have uncovered a bug in wpa_supplicant v0.2.5 in 
>> combination with the hostAP driver.
>> 
>> I'm using wpa_supplicant for associating with APs running WEP & WPA-PSK 
>> as well as open APs.  I found in my testing that wpa_supplicant wouldn't 
>> properly associate with open APs.
>
>> The function wpa_supplicant_hostap_set_wpa() in driver_hostap.c is 
>> always called by wpa_supplicant_driver_init().  It always sets 
>> PRISM2_PARAM_PRIVACY_INVOKED to true.  I've found that this has the ill 
>> side-effect of preventing wpa_supplicant from associating with an open 
>> AP ( ie. no WEP or WPA ).  When I commented this line out, everything 
>> worked...
>
> Which AP did you use? This may be somewhat implementation specific since
> I was able to associate with an AP using plaintext. Anyway, the change
> you have looks fine and I did a similar changed, though based on
> key_mgmt, not wpa_ie == NULL, to cover IEEE 802.1X with WEP keys case.


I believe I have the same problem with the madwifi-driver.  I am
trying to use wpa_supplicant as a simple roaming daemon, just choosing
the right one out of a set of available open APs.

The access points seems to be Cisco something.  Not sure about the
details since someone must have turned off CDP :-)

With the Debian Sarge wpasupplicant package, I get this:

obelix:/tmp# wpa_supplicant -v
wpa_supplicant v0.3.2 - Copyright (c) 2003-2004, Jouni Malinen <jkmaline at cc.hut.fi>
obelix:/tmp# wpa_supplicant -dd  -iath0 -Dmadwifi -c/etc/wpasupplicant/wpa_supplicant.conf
Initializing interface 'ath0' conf '/etc/wpasupplicant/wpa_supplicant.conf' driver 'madwifi'
Configuration file '/etc/wpasupplicant/wpa_supplicant.conf' -> '/etc/wpasupplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpasupplicant/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
Line: 240 - start of a new network block
ssid - hexdump_ascii(len=3):
     66 62 75                                          fbu             
key_mgmt: 0x4
Line: 244 - start of a new network block
ssid - hexdump_ascii(len=4):
     57 4c 41 4e                                       WLAN            
key_mgmt: 0x4
Line: 249 - start of a new network block
ssid - hexdump_ascii(len=3):
     53 4d 43                                          SMC             
key_mgmt: 0x4
Priority group 0
   id=0 ssid='fbu'
   id=1 ssid='WLAN'
   id=2 ssid='SMC'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Own MAC address: 00:05:4e:4c:77:69
wpa_driver_madwifi_set_wpa: enabled=1
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_set_countermeasures: enabled=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b1a len=12
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Disconnect event - remove keys
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_del_key: keyidx=0
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
[..]
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b1a len=12
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
Wireless event: cmd=0x8b19 len=12
Received 330 bytes of scan results (2 BSSes)
Scan results: 2
Selecting BSS from priority group 0
0: 00:40:96:56:1b:1d ssid='fbu' wpa_ie_len=0 rsn_ie_len=0
   skip - no WPA/RSN IE
1: 00:0b:ac:e8:0b:83 ssid='' wpa_ie_len=0 rsn_ie_len=0
   skip - no WPA/RSN IE
   selected non-WPA AP 00:40:96:56:1b:1d ssid='fbu'
Trying to associate with 00:40:96:56:1b:1d (SSID='fbu' freq=2452 MHz)
Cancelling scan request
Automatic auth_alg selection: 0x1
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=0
wpa_driver_madwifi_associate
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
Wireless event: cmd=0x8b1a len=16
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=0
Authentication with 00:00:00:00:00:00 timed out.
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec

It's not clear to me how the problem should be properly fixed, but
the simple hack I've attached lets me associate so I am pretty sure
the problem is identified:


Selecting BSS from priority group 0
0: 00:40:96:56:1b:1d ssid='fbu' wpa_ie_len=0 rsn_ie_len=0
   skip - no WPA/RSN IE
   selected non-WPA AP 00:40:96:56:1b:1d ssid='fbu'
Trying to associate with 00:40:96:56:1b:1d (SSID='fbu' freq=2452 MHz)
Cancelling scan request
Automatic auth_alg selection: 0x1
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=0
wpa_driver_madwifi_associate
wpa_driver_madwifi_set_wpa: enabled=0
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
Wireless event: cmd=0x8b1a len=16
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:40:96:56:1b:1d
Association event - clear replay counter
Associated to a new BSS: BSSID=00:40:96:56:1b:1d
Associated with 00:40:96:56:1b:1d
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state S_FORCE_AUTH
EAPOL: SUPP_BE entering state IDLE
EAP: EAP entering state INITIALIZE
EAP: EAP entering state IDLE
Cancelling authentication timeout
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=59
EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=0 idleWhile=58


Bj?rn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: driver_madwifi.diff
Type: text/x-patch
Size: 695 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20050107/ae6670bc/attachment.bin 



More information about the Hostap mailing list