Connection/disconnection problems with wpa_supplicant and hostapd when using WPA2 encryption

Adrien Decostre ad.decostre
Mon Jan 23 11:34:47 PST 2012


Dear Johannes,

I have added in attachment the hostapd log.
But the only thing I see is that the client (mac 00:23:a7:39:d0:69)
"did not acknowledge authentication" and that this causes the
disassociation.
What is the signification of the "reason_code=3" for the disassociation?

Thanks in advance for your help.

Best regards

On Mon, Jan 23, 2012 at 8:19 PM, Adrien Decostre <ad.decostre at gmail.com> wrote:
> Dear Jouni,
>
> Thanks a lot for this quick answer.
> The ath9k driver is used on the access point with hostapd.
> In attachment, there is a full log file from wpa_supplicant where the
> client disconnects before the completion of the authentication
> procedure (due to limited size of the attachment, I have cut the part
> of the log showing successful authentication).
> Up to now, I have seen this problem with different PCs among other one
> with a rt2800usb driver
>
> Is there a way to reduce the authentication timeout (now currently set
> to 10sec.) such that in case of "authentication failure", the
> authentication procedure is restarted sooner?
>
>
> Thanks in advance for your answer.
>
> On Mon, Jan 23, 2012 at 7:23 PM, Johannes Berg
> <johannes at sipsolutions.net> wrote:
>> On 2012-01-23 04:39, Adrien Decostre wrote:
>>> Apparently, the client is 1st correctly associated (message ?State:
>>> ASSOCIATING -> ASSOCIATED? visible in the wpa_supplicant log) but the
>>> client is soon after disconnected due to authentication problem with
>>> the following error message:
>>>
>>> WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
>>> Authentication with 00:0e:8e:3b:05:6d timed out.
>>> BSSID 00:0e:8e:3b:05:6d blacklist count incremented to 2
>>> wpa_driver_wext_disassociate
>>> No keys have been configured - skip key clearing
>>> State: ASSOCIATED -> DISCONNECTED.
>>>
>>>
>>>
>>> After this the client restarts the association/authentication
>>> procedure and after a few tries the authentication succeed.
>>
>> Need logs from hostapd, but it could be that there are not enough
>> random numbers.
>>
>> johannes
>> _______________________________________________
>> HostAP mailing list
>> HostAP at lists.shmoo.com
>> http://lists.shmoo.com/mailman/listinfo/hostap
-------------- next part --------------

root at x86:~# hostapd /etc/hostapd.conf -d
Configuration file: /etc/hostapd.conf
nl80211: Add own interface ifindex 5
nl80211: New interface mon.wlan0 created: ifindex=15
nl80211: Add own interface ifindex 15
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Added 802.11b mode based on 802.11g information
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 13  Frequency: 2472 MHz
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:0e:8e:3b:05:6d and ssid 'bidule_xyz'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=15):
     43 6c 69 63 6b 53 68 61 72 65 5f 41 44 45 43      bidule_xyz
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=5 alg=3 addr=(nil) key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: Set beacon (beacon_set=0)
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::auth
authentication: STA=28:28:28:28:9b:5a auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 28:28:28:28:9b:5a IEEE 802.11: authentication OK (open system)
authentication reply: STA=28:28:28:28:9b:5a auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA 28:28:28:28:9b:5a IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=28:28:28:28:9b:5a capab_info=0x411 listen_interval=3
  new AID 1
nl80211: Set beacon (beacon_set=1)
update_sta_no_ht STA 28:28:28:28:9b:5a - no HT, num of non-HT stations 1
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x13 changes=2
nl80211: Set beacon (beacon_set=1)
wlan0: STA 28:28:28:28:9b:5a IEEE 802.11: association OK (aid 1)
mgmt::assoc_resp cb
wlan0: STA 28:28:28:28:9b:5a IEEE 802.11: associated (aid 1)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x684ee0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=28:28:28:28:9b:5a
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x684ee0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=28:28:28:28:9b:5a
WPA: 28:28:28:28:9b:5a WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x684ee0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=28:28:28:28:9b:5a
WPA: 28:28:28:28:9b:5a WPA_PTK_GROUP entering state IDLE
WPA: 28:28:28:28:9b:5a WPA_PTK entering state AUTHENTICATION
WPA: 28:28:28:28:9b:5a WPA_PTK entering state AUTHENTICATION2
WPA: 28:28:28:28:9b:5a WPA_PTK entering state INITPSK
WPA: 28:28:28:28:9b:5a WPA_PTK entering state PTKSTART
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
IEEE 802.1X: 28:28:28:28:9b:5a TX status - version=2 type=3 length=95 - ack=1
WPA: 28:28:28:28:9b:5a WPA_PTK entering state PTKSTART
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
IEEE 802.1X: 28:28:28:28:9b:5a TX status - version=2 type=3 length=95 - ack=1
IEEE 802.1X: 121 bytes from 28:28:28:28:9b:5a
   IEEE 802.1X: version=1 type=3 length=117
WPA: 28:28:28:28:9b:5a WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=00:0e:8e:3b:05:6d A2=28:28:28:28:9b:5a
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: 28:28:28:28:9b:5a WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 28:28:28:28:9b:5a WPA_PTK entering state PTKINITNEGOTIATING
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8 kde_len=46 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
IEEE 802.1X: 28:28:28:28:9b:5a TX status - version=2 type=3 length=151 - ack=1
IEEE 802.1X: 99 bytes from 28:28:28:28:9b:5a
   IEEE 802.1X: version=1 type=3 length=95
WPA: 28:28:28:28:9b:5a WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=5 alg=3 addr=0x684ee0 key_idx=0 set_tx=1 seq_len=0 key_len=16
   addr=28:28:28:28:9b:5a
AP-STA-CONNECTED 28:28:28:28:9b:5a
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::auth
authentication: STA=00:23:a7:39:d0:69 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: authentication OK (open system)
authentication reply: STA=00:23:a7:39:d0:69 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::assoc_req
association request: STA=00:23:a7:39:d0:69 capab_info=0x431 listen_interval=8
  new AID 2
HT: STA 00:23:a7:39:d0:69 HT Capabilities Info: 0x0000
update_sta_ht STA 00:23:a7:39:d0:69 - no greenfield, num of non-gf stations 1
update_sta_ht STA 00:23:a7:39:d0:69 - 20 MHz HT, num of 20MHz HT STAs 1
hostapd_ht_operation_update current operation mode=0x13
hostapd_ht_operation_update new operation mode=0x17 changes=1
nl80211: Set beacon (beacon_set=1)
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: association OK (aid 2)
mgmt::auth cb
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: did not acknowledge authentication response
mgmt::assoc_resp cb
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: did not acknowledge association response
mgmt::disassoc
disassocation: STA=00:23:a7:39:d0:69 reason_code=3
AP-STA-DISCONNECTED 00:23:a7:39:d0:69
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state DISCONNECTED
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
Could not set station 00:23:a7:39:d0:69 flags for kernel driver (errno=11).
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: disassociated
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
Sending deauthentication info to STA 00:23:a7:39:d0:69
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: deauthenticated due to inactivity
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
hostapd_ht_operation_update current operation mode=0x17
hostapd_ht_operation_update new operation mode=0x13 changes=1
nl80211: Set beacon (beacon_set=1)
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::auth
authentication: STA=00:23:a7:39:d0:69 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: authentication OK (open system)
authentication reply: STA=00:23:a7:39:d0:69 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::assoc_req
association request: STA=00:23:a7:39:d0:69 capab_info=0x431 listen_interval=8
  new AID 2
HT: STA 00:23:a7:39:d0:69 HT Capabilities Info: 0x0000
update_sta_ht STA 00:23:a7:39:d0:69 - no greenfield, num of non-gf stations 1
update_sta_ht STA 00:23:a7:39:d0:69 - 20 MHz HT, num of 20MHz HT STAs 1
hostapd_ht_operation_update current operation mode=0x13
hostapd_ht_operation_update new operation mode=0x17 changes=1
nl80211: Set beacon (beacon_set=1)
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: association OK (aid 2)
mgmt::auth cb
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: did not acknowledge authentication response
mgmt::assoc_resp cb
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: did not acknowledge association response
mgmt::disassoc
disassocation: STA=00:23:a7:39:d0:69 reason_code=3
AP-STA-DISCONNECTED 00:23:a7:39:d0:69
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state DISCONNECTED
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
Could not set station 00:23:a7:39:d0:69 flags for kernel driver (errno=11).
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: disassociated
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
mgmt::proberesp cb
Sending deauthentication info to STA 00:23:a7:39:d0:69
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: deauthenticated due to inactivity
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
hostapd_ht_operation_update current operation mode=0x17
hostapd_ht_operation_update new operation mode=0x13 changes=1
nl80211: Set beacon (beacon_set=1)
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::auth
authentication: STA=00:23:a7:39:d0:69 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: authentication OK (open system)
authentication reply: STA=00:23:a7:39:d0:69 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=00:23:a7:39:d0:69 capab_info=0x431 listen_interval=8
  new AID 2
HT: STA 00:23:a7:39:d0:69 HT Capabilities Info: 0x0000
update_sta_ht STA 00:23:a7:39:d0:69 - no greenfield, num of non-gf stations 1
update_sta_ht STA 00:23:a7:39:d0:69 - 20 MHz HT, num of 20MHz HT STAs 1
hostapd_ht_operation_update current operation mode=0x13
hostapd_ht_operation_update new operation mode=0x17 changes=1
nl80211: Set beacon (beacon_set=1)
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: association OK (aid 2)
mgmt::assoc_resp cb
wlan0: STA 00:23:a7:39:d0:69 IEEE 802.11: associated (aid 2)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:23:a7:39:d0:69
WPA: 00:23:a7:39:d0:69 WPA_PTK_GROUP entering state IDLE
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state AUTHENTICATION
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state AUTHENTICATION2
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state INITPSK
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state PTKSTART
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
IEEE 802.1X: 00:23:a7:39:d0:69 TX status - version=2 type=3 length=95 - ack=1
IEEE 802.1X: 121 bytes from 00:23:a7:39:d0:69
   IEEE 802.1X: version=1 type=3 length=117
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=00:0e:8e:3b:05:6d A2=00:23:a7:39:d0:69
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state PTKINITNEGOTIATING
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8 kde_len=46 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
IEEE 802.1X: 00:23:a7:39:d0:69 TX status - version=2 type=3 length=151 - ack=1
IEEE 802.1X: 99 bytes from 00:23:a7:39:d0:69
   IEEE 802.1X: version=1 type=3 length=95
WPA: 00:23:a7:39:d0:69 WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=5 alg=3 addr=0x686aa0 key_idx=0 set_tx=1 seq_len=0 key_len=16
   addr=00:23:a7:39:d0:69
AP-STA-CONNECTED 00:23:a7:39:d0:69



More information about the Hostap mailing list