From owner-freebsd-current@FreeBSD.ORG Tue Mar 24 19:13:21 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 364B9106568E for ; Tue, 24 Mar 2009 19:13:21 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id 168F98FC08 for ; Tue, 24 Mar 2009 19:13:20 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from localhost (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 1865A130C3C for ; Tue, 24 Mar 2009 19:55:31 +0100 (CET) X-Virus-Scanned: amavisd-new at madpilot.net Received: from megatron.madpilot.net ([127.0.0.1]) by localhost (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J4flKKFQ7REZ for ; Tue, 24 Mar 2009 19:55:28 +0100 (CET) Received: from wedge.madpilot.net (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP for ; Tue, 24 Mar 2009 19:55:28 +0100 (CET) Message-ID: <49C92C9F.4050000@madpilot.net> Date: Tue, 24 Mar 2009 19:55:27 +0100 From: Guido Falsi User-Agent: Thunderbird 2.0.0.21 (X11/20090323) MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: wpa_supplicant can't associate with WPA2 AP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2009 19:13:21 -0000 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