Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 19:55:27 +0100
From:      Guido Falsi <mad@madpilot.net>
To:        freebsd-current@freebsd.org
Subject:   wpa_supplicant can't associate with WPA2 AP
Message-ID:  <49C92C9F.4050000@madpilot.net>

next in thread | raw e-mail | index | archive | help
Hello.

I installed FreeBSD-current on my laptop recently, machine used to run 
7.1 without problems, and worked flawlessly with my AP using WPA2+PSK.

The PC is a Dell inspiron 8600 laptop with an intel 2100 wifi card (ipw 
driver). The AP I'm trying to connect to has ssid "LILLIPUT".

After installing current I modified my configuration for the new wlan 
interface cloning order and tried to associate as usual, but am now 
getting errors in the preauth phase and wpa_supplicant just loops around 
the problem.

This is the debugging output from WPA supplicant (it's a bit long, I 
know...)

root@anakin:~ [0]# wpa_supplicant -dd -i wlan0 -c /etc/wpa_supplicant.conf
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 
'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ap_scan=1
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=8):
      4c 49 4c 4c 49 50 55 54                           LILLIPUT
PSK (ASCII passphrase) - hexdump_ascii(len=22): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
    id=0 ssid='LILLIPUT'
Initializing interface (2) 'wlan0'
Own MAC address: 00:0c:f1:37:58:b7
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wpa_driver_bsd_del_key: keyidx=0
wpa_driver_bsd_del_key: keyidx=1
wpa_driver_bsd_del_key: keyidx=2
wpa_driver_bsd_del_key: keyidx=3
wpa_driver_bsd_set_countermeasures: enabled=0
wpa_driver_bsd_set_drop_unencrypted: enabled=1
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
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
Added interface wlan0
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan 
to speed up initial association
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Cached scan results are empty - not posting
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
EAPOL: disable timer tick
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (3 BSSes)
Scan results: 3
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    selected based on RSN IE
    selected WPA AP 00:14:6c:e0:ee:e6 ssid='LILLIPUT'
Trying to associate with 00:14:6c:e0:ee:e6 (SSID='LILLIPUT' freq=2422 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 
0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 
01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'LILLIPUT' wpa ie len 22 pairwise 3 group 
3 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto

	RSN: Ignored PMKID candidate without preauth flag
	Authentication with 00:14:6c:e0:ee:e6 timed out.
	Added BSSID 00:14:6c:e0:ee:e6 into blacklist

No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (3 BSSes)
Scan results: 3
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    selected based on RSN IE
    selected WPA AP 00:14:6c:e0:ee:e6 ssid='LILLIPUT'
Trying to associate with 00:14:6c:e0:ee:e6 (SSID='LILLIPUT' freq=2422 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 
0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 
01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'LILLIPUT' wpa ie len 22 pairwise 3 group 
3 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto

	RSN: Ignored PMKID candidate without preauth flag
	Authentication with 00:14:6c:e0:ee:e6 timed out.
	BSSID 00:14:6c:e0:ee:e6 blacklist count incremented to 2

No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (3 BSSes)
Scan results: 3
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    skip - blacklisted
1: 00:18:02:84:e4:81 ssid='Alice-91589054' wpa_ie_len=22 rsn_ie_len=0 
caps=0x31
    skip - SSID mismatch
2: 00:1c:a2:58:ff:7b ssid='Alice-57582990' wpa_ie_len=24 rsn_ie_len=0 
caps=0x11
    skip - SSID mismatch
Try to find non-WPA AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    skip - blacklisted
1: 00:18:02:84:e4:81 ssid='Alice-91589054' wpa_ie_len=22 rsn_ie_len=0 
caps=0x31
    skip - SSID mismatch
2: 00:1c:a2:58:ff:7b ssid='Alice-57582990' wpa_ie_len=24 rsn_ie_len=0 
caps=0x11
    skip - SSID mismatch
No APs found - clear blacklist and try again
Removed BSSID 00:14:6c:e0:ee:e6 from blacklist (clear)
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    selected based on RSN IE
    selected WPA AP 00:14:6c:e0:ee:e6 ssid='LILLIPUT'
Trying to associate with 00:14:6c:e0:ee:e6 (SSID='LILLIPUT' freq=2422 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 
0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 
01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'LILLIPUT' wpa ie len 22 pairwise 3 group 
3 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto

	RSN: Ignored PMKID candidate without preauth flag
	Authentication with 00:14:6c:e0:ee:e6 timed out.
	Added BSSID 00:14:6c:e0:ee:e6 into blacklist

No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (3 BSSes)
Scan results: 3
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    selected based on RSN IE
    selected WPA AP 00:14:6c:e0:ee:e6 ssid='LILLIPUT'
Trying to associate with 00:14:6c:e0:ee:e6 (SSID='LILLIPUT' freq=2422 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 
0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 
01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'LILLIPUT' wpa ie len 22 pairwise 3 group 
3 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto

	RSN: Ignored PMKID candidate without preauth flag
	Authentication with 00:14:6c:e0:ee:e6 timed out.
	BSSID 00:14:6c:e0:ee:e6 blacklist count incremented to 2

No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (3 BSSes)
Scan results: 3
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    skip - blacklisted
1: 00:18:02:84:e4:81 ssid='Alice-91589054' wpa_ie_len=22 rsn_ie_len=0 
caps=0x31
    skip - SSID mismatch
2: 00:1c:a2:58:ff:7b ssid='Alice-57582990' wpa_ie_len=24 rsn_ie_len=0 
caps=0x11
    skip - SSID mismatch
Try to find non-WPA AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    skip - blacklisted
1: 00:18:02:84:e4:81 ssid='Alice-91589054' wpa_ie_len=22 rsn_ie_len=0 
caps=0x31
    skip - SSID mismatch
2: 00:1c:a2:58:ff:7b ssid='Alice-57582990' wpa_ie_len=24 rsn_ie_len=0 
caps=0x11
    skip - SSID mismatch
No APs found - clear blacklist and try again
Removed BSSID 00:14:6c:e0:ee:e6 from blacklist (clear)
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:14:6c:e0:ee:e6 ssid='LILLIPUT' wpa_ie_len=0 rsn_ie_len=20 caps=0x11
    selected based on RSN IE
    selected WPA AP 00:14:6c:e0:ee:e6 ssid='LILLIPUT'
Trying to associate with 00:14:6c:e0:ee:e6 (SSID='LILLIPUT' freq=2422 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 
0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 
01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'LILLIPUT' wpa ie len 22 pairwise 3 group 
3 key mgmt 1
wpa_driver_bsd_associate: set PRIVACY 1
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto

	RSN: Ignored PMKID candidate without preauth flag

^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_bsd_set_wpa: enabled=0
wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
Failed to disable WPA in the driver.
wpa_driver_bsd_set_drop_unencrypted: enabled=0
wpa_driver_bsd_set_countermeasures: enabled=0
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
wpa_driver_bsd_set_wpa_internal: wpa=2 privacy=0
ELOOP: remaining socket: sock=4 eloop_data=0x28406140 
user_data=0x2840e040 handler=0x806a2a0


I indented the error messages.

here are the relevant configurations, wpa_supplicant.conf:

ap_scan=1

network={
	ssid="LILLIPUT"
	psk="secret"
}

and excerpt from rc.conf:

wlans_ipw0="wlan0"
create_args_wlan0="wlanmode sta country IT"
ifconfig_wlan0="WPA DHCP"

I dug around the sources and tried modifying the file 
src/contrib/wpa/src/rsn_supp/preauth.c, in the function 
rsn_preauth_scan_results to return true for the last argument of 
pmksa_candidate_add, but it just gives me another error about not being 
in the correct state for pre-auth.

I don't know much about the internals of wifi security or adapters, so I 
could not try much more, and google was of very little help.

I don't really know what the problem is, but what looks strange to me is 
that this same PC was working fine with this same AP and same config 
with 7.1.

Anyone has some pointers for what to look at? Does this need debugging?

Thanks to anyone willing to help!

-- 
Guido Falsi <mad@madpilot.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49C92C9F.4050000>