wpa_supplicant ndiswrapper

Gerhard Schaden ges
Thu Aug 7 10:50:57 PDT 2008


Hi,

 

I'm struggling with a very strange behavior of wpa_supplicant. Updating
to ubuntu 8.04 with kernel 2.6.24-16 may be related, because I didn't
face these problems with 2.6.22. 

Using different versions of ndiswrapper, xpdrivers, wpa_supplicant lead
always to the same issue. 

 

When starting wpa_supplicant with

 

wpa_supplicant -i wlan0 -c/etc/wpa_supplicant.conf.wlan0 -Dwext 

 

the connection is never finished, here is some output of the debug. It
looks like a packet from the wpa headshake is seen twice.

 

Associated with 00:18:39:d3:b6:01

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:18:39:d3:b6:01 completed (auth)
[id=0 id_str=]

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

WPA: EAPOL-Key Replay Counter did not increase - dropping packet

Associated with 00:18:39:d3:b6:01

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:18:39:d3:b6:01 completed
(reauth) [id=0 id_str=]

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

WPA: EAPOL-Key Replay Counter did not increase - dropping packet

Associated with 00:18:39:d3:b6:01

CTRL-EVENT-TERMINATING - signal 2 received

 

With -d

 

WPA: Sending EAPOL-Key 4/4

WPA: Installing PTK to the driver.

wpa_driver_wext_set_key: alg=2 key_idx=0 set_tx=1 seq_len=6 key_len=32

EAPOL: External notification - portValid=1

State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE new: 1

RSN: received GTK in pairwise handshake - hexdump(len=34): [REMOVED]

WPA: Group Key - hexdump(len=32): [REMOVED]

WPA: Installing GTK to the driver (keyidx=1 tx=0 len=32).

WPA: RSC - hexdump(len=6): 5a 37 00 00 00 00

wpa_driver_wext_set_key: alg=2 key_idx=1 set_tx=0 seq_len=6 key_len=32

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

Cancelling scan request

Cancelling authentication timeout

Removed BSSID 00:18:39:d3:b6:01 from blacklist

State: GROUP_HANDSHAKE -> COMPLETED new: 1

CTRL-EVENT-CONNECTED - Connection to 00:18:39:d3:b6:01 completed (auth)
[id=0 id_str=]

wpa_driver_wext_set_operstate: operstate 0->1 (UP)

WEXT: Operstate: linkmode=-1, operstate=6

EAPOL: External notification - portValid=1

EAPOL: External notification - EAP success=1

EAPOL: SUPP_PAE entering state AUTHENTICATING

EAPOL: SUPP_BE entering state SUCCESS

EAP: EAP entering state DISABLED

EAPOL: SUPP_PAE entering state AUTHENTICATED

EAPOL: SUPP_BE entering state IDLE

EAPOL authentication completed successfully

RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RX EAPOL from 00:18:39:d3:b6:01

IEEE 802.1X RX: version=2 type=3 length=157

  EAPOL-Key type=2

  key_info 0x13c9 (ver=1 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure
Encr)

  key_length=32 key_data_length=62

  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03

  key_nonce - hexdump(len=32): ad 47 58 3e ad 62 1e 85 84 d6 ff c8 3a a2
1f 90 c8 87 82 a0 8b 9b 86 71 55 81 fb b9 d8 c5 cb b8

  key_iv - hexdump(len=16): c8 87 82 a0 8b 9b 86 71 55 81 fb b9 d8 c5 cb
b9

  key_rsc - hexdump(len=8): 5e 37 00 00 00 00 00 00

  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00

  key_mic - hexdump(len=16): 02 50 81 1f 45 dd 8c 71 45 d2 f9 ac 3e 83
43 b9

RSN: encrypted key data - hexdump(len=62): 1b 83 d5 8c b4 dc 33 97 ef 45
74 fb e6 0d 69 9e 7b c5 a0 36 71 e1 6b 5b 20 af 14 a3 2e 3a 5d 5f f4 c9
cc 34 f1 81 e7 1d 24 aa 4b d3 2c 3f de ba c1 b0 e0 4e 0b 70 65 ba e6 1a
16 9f 3a fd

WPA: decrypted EAPOL-Key key data - hexdump(len=62): [REMOVED]

State: COMPLETED -> 4WAY_HANDSHAKE new: 0

WPA: RX message 3 of 4-Way Handshake from 00:18:39:d3:b6:01 (ver=1)

 

 

And now the strange part, if I  trace wpa_supplicant which strace it
works.

 

strace -o /tmp/x wpa_supplicant -i wlan0
-c/etc/wpa_supplicant.conf.wlan0 -Dwext 

 

 

Associated with 00:18:39:d3:b6:01

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:18:39:d3:b6:01 completed (auth)
[id=0 id_str=]

 

With -d

 

WPA: Sending EAPOL-Key 4/4

WPA: Installing PTK to the driver.

wpa_driver_wext_set_key: alg=2 key_idx=0 set_tx=1 seq_len=6 key_len=32

EAPOL: External notification - portValid=1

State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE new: 1

RSN: received GTK in pairwise handshake - hexdump(len=34): [REMOVED]

WPA: Group Key - hexdump(len=32): [REMOVED]

WPA: Installing GTK to the driver (keyidx=1 tx=0 len=32).

WPA: RSC - hexdump(len=6): 05 37 00 00 00 00

wpa_driver_wext_set_key: alg=2 key_idx=1 set_tx=0 seq_len=6 key_len=32

WPA: Key negotiation completed with 00:18:39:d3:b6:01 [PTK=TKIP
GTK=TKIP]

Cancelling scan request

Cancelling authentication timeout

Removed BSSID 00:18:39:d3:b6:01 from blacklist

State: GROUP_HANDSHAKE -> COMPLETED new: 1

CTRL-EVENT-CONNECTED - Connection to 00:18:39:d3:b6:01 completed (auth)
[id=0 id_str=]

wpa_driver_wext_set_operstate: operstate 0->1 (UP)

WEXT: Operstate: linkmode=-1, operstate=6

EAPOL: External notification - portValid=1

EAPOL: External notification - EAP success=1

EAPOL: SUPP_PAE entering state AUTHENTICATING

EAPOL: SUPP_BE entering state SUCCESS

EAP: EAP entering state DISABLED

EAPOL: SUPP_PAE entering state AUTHENTICATED

EAPOL: SUPP_BE entering state IDLE

EAPOL authentication completed successfully

RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

EAPOL: startWhen --> 0

EAPOL: disable timer tick

 

 

Best Regards,

 

Gerhard Schaden

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20080807/f42c0ea8/attachment.htm 



More information about the Hostap mailing list