Roaming and 4-Way Handshake issues

Michael Voorhaen michael.voorhaen
Mon Jan 26 06:19:09 PST 2009


Hi,

I'm experimenting with a node roaming between APs and have set up the  
following test:

Two APs and one host. I force the host to move from one AP to another  
by having the host connected to one AP, then starting hostap on the  
second AP and then stopping hostap on the first. The idea being that  
the host would each time fall back to the other remaining AP.

Settings for security are:

wpa=1
wpa_passphrase=settosomething
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP

I've tested hostapd 0.5.5 (default on voyage-linux-0.5.2) and tested  
0.5.11 and 0.6.7 on the same distro and all have the same behaviour. I  
haven't tested this on the most recent voyage-linux yet as there I am  
experiencing troubles with the madwifi driver in AP mode.

The setup works fine most of the time, however sometimes the host  
fails to move to the other AP because it can not authenticate. The  
host in this example is a Macbook Pro. I've tested this over and over  
again with my iPhone and there the problem does not occur. There is a  
difference in the output though, the following output occurs for the  
iPhone and not for the MBP:

ath0: STA 00:21:e9:2d:64:7d RADIUS: starting accounting session  
44209244-00000000

This is the output of hostap for when it fails for my MBP:

voyage:~# ./hostapd -d /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 44: DEPRECATED: 'debug' configuration variable is not used anymore
ctrl_interface_group=0
madwifi_set_iface_flags: dev_up=0
madwifi_set_privacy: enabled=0
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=13 enc_capa=0xf
ath0: IEEE 802.11 Fetching hardware channel/rate support not supported.
Flushing old station entries
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
madwifi_sta_deauth: Failed to deauth STA (addr ff:ff:ff:ff:ff:ff  
reason 3)
Could not connect to kernel driver.
Deauthenticate all stations
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=2
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
madwifi_sta_deauth: Failed to deauth STA (addr ff:ff:ff:ff:ff:ff  
reason 2)
madwifi_set_privacy: enabled=0
Mode: IEEE 802.11g  Channel: 1  Frequency: 0 MHz
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=0
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=1
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=2
madwifi_del_key: addr=00:00:00:00:00:00 key_idx=3
Using interface ath0 with hwaddr 00:80:48:53:00:3b and ssid 'roaming'
SSID - hexdump_ascii(len=7):
      72 6f 61 6d 69 6e 67                              roaming
PSK (ASCII passphrase) - hexdump_ascii(len=8):
      62 6f 6e 65 77 69 73 68                           bonewish
PSK (from passphrase) - hexdump(len=32): 53 f2 9f f8 ab ab a0 53 74 9b  
dd 39 fb 59 0c 0b 83 f3 fe b9 8c f8 22 c7 7b 72 32 2f ae 7d 9b 37
madwifi_set_ieee8021x: enabled=1
madwifi_configure_wpa: group key cipher=1
madwifi_configure_wpa: pairwise key ciphers=0xa
madwifi_configure_wpa: key management algorithms=0x2
madwifi_configure_wpa: rsn capabilities=0x0
madwifi_configure_wpa: enable WPA=0x1
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
madwifi_set_key: alg=TKIP addr=00:00:00:00:00:00 key_idx=1
madwifi_set_privacy: enabled=1
madwifi_set_iface_flags: dev_up=1
ath0: Setup of interface done.
l2_packet_receive - recvfrom: Network is down
ath0: STA 00:1e:c2:bc:f4:a5 IEEE 802.11: associated
   New STA
ath0: STA 00:1e:c2:bc:f4:a5 WPA: event 1 notification
madwifi_del_key: addr=00:1e:c2:bc:f4:a5 key_idx=0
ath0: STA 00:1e:c2:bc:f4:a5 WPA: start authentication
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:1e:c2:bc:f4:a5 key_idx=0
madwifi_set_sta_authorized: addr=00:1e:c2:bc:f4:a5 authorized=0
ath0: STA 00:1e:c2:bc:f4:a5 IEEE 802.1X: unauthorizing port
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK_GROUP entering state IDLE
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state AUTHENTICATION
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state AUTHENTICATION2
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state INITPSK
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state PTKSTART
ath0: STA 00:1e:c2:bc:f4:a5 WPA: sending 1/4 msg of 4-Way Handshake
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: 123 bytes from 00:1e:c2:bc:f4:a5
    IEEE 802.1X: version=1 type=3 length=119
ath0: STA 00:1e:c2:bc:f4:a5 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=00:80:48:53:00:3b A2=00:1e:c2:bc:f4:a5
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
ath0: STA 00:1e:c2:bc:f4:a5 WPA: invalid MIC in msg 2/4 of 4-Way  
Handshake
ath0: STA 00:1e:c2:bc:f4:a5 WPA: EAPOL-Key timeout
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state PTKSTART
ath0: STA 00:1e:c2:bc:f4:a5 WPA: sending 1/4 msg of 4-Way Handshake
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: 123 bytes from 00:1e:c2:bc:f4:a5
    IEEE 802.1X: version=1 type=3 length=119
ath0: STA 00:1e:c2:bc:f4:a5 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=00:80:48:53:00:3b A2=00:1e:c2:bc:f4:a5
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
ath0: STA 00:1e:c2:bc:f4:a5 WPA: invalid MIC in msg 2/4 of 4-Way  
Handshake
ath0: STA 00:1e:c2:bc:f4:a5 WPA: EAPOL-Key timeout
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state PTKSTART
ath0: STA 00:1e:c2:bc:f4:a5 WPA: sending 1/4 msg of 4-Way Handshake
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: 123 bytes from 00:1e:c2:bc:f4:a5
    IEEE 802.1X: version=1 type=3 length=119
ath0: STA 00:1e:c2:bc:f4:a5 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=00:80:48:53:00:3b A2=00:1e:c2:bc:f4:a5
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
ath0: STA 00:1e:c2:bc:f4:a5 WPA: invalid MIC in msg 2/4 of 4-Way  
Handshake
ath0: STA 00:1e:c2:bc:f4:a5 WPA: EAPOL-Key timeout
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state PTKSTART
ath0: STA 00:1e:c2:bc:f4:a5 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8  
kde_len=0 keyidx=0 encr=0)
Custom wireless event: 'STA-TRAFFIC-STAT
mac=00:1e:c2:bc:f4:a5
rx_packets=3
rx_bytes=411
tx_packets=4
tx_bytes=428
'
ath0: STA 00:1e:c2:bc:f4:a5 IEEE 802.11: disassociated
ath0: STA 00:1e:c2:bc:f4:a5 WPA: event 2 notification
madwifi_del_key: addr=00:1e:c2:bc:f4:a5 key_idx=0
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
madwifi_del_key: Failed to delete key (addr 00:1e:c2:bc:f4:a5 key_idx 0)
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state DISCONNECTED
WPA: 00:1e:c2:bc:f4:a5 WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:1e:c2:bc:f4:a5 key_idx=0
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
madwifi_del_key: Failed to delete key (addr 00:1e:c2:bc:f4:a5 key_idx 0)
madwifi_set_sta_authorized: addr=00:1e:c2:bc:f4:a5 authorized=0
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
madwifi_set_sta_authorized: Failed to unauthorize STA 00:1e:c2:bc:f4:a5
ath0: STA 00:1e:c2:bc:f4:a5 IEEE 802.1X: unauthorizing port
Could not set station 00:1e:c2:bc:f4:a5 flags for kernel driver  
(errno=29).


Regards,
Michael

-------------------------
IBBT - PATS research group
Dept. of Mathematics and Computer Sciences
University of Antwerp
Campus Middelheim, G3.30
Middelheimlaan 1
B-2020 Antwerpen, Belgium
Phone: +32 (0)3 265.32.91
Fax: +32 (0)3 265.37.77
Web: www.pats.ua.ac.be/michael.voorhaen










More information about the Hostap mailing list