It looks like the error comes from :<br> ......<br> ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long<br> madwifi_set_sta_authorized: Failed to unauthorize STA 00:92:c3:80:05:7d<br> ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: unauthorizing port<br>
Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).<br> ......<br><br>I don‘t know why it failed to unauthorized,my password is OK。<br><br>And the message said it could not set station flags for kernel driver,is it lack of something in my kernel ?<br>
<br><br><br><div class="gmail_quote">2010/1/11 Peter Zhou <span dir="ltr"><<a href="mailto:peterzhou2003@gmail.com">peterzhou2003@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><div>Thank you for your reply.<br><br>Yes, you are right,
iwr->u.data.length and sizeof(wpaie) in the beginning of
ieee80211_ioctl_getwpaie() in MadWifi are not the same size without
your patch.<br><br></div></div>Now there is no "Failed to get WPA/RSN IE" error
message to apply your patch, but my client still can't connect to the
ap. Some of the debug message is as below. The message is too big, so please refer to the attachment for the all message.<br>
<br>Thank you.<br>==========================================================================<br>............<div class="im"><br>ath0: Setup of interface done.<br>l2_packet_receive - recvfrom: Network is down<br>Wireless event: cmd=0x8c03 len=20<br>
ath0: STA 00:92:c3:80:05:7d IEEE<br></div><div class="im">=======ieee80211_ioctl_getwpaie() :iwr->u.data.length=518, sizeof(wpaie)=518.<br></div><div class="im"> 802.11: associated<br> New STA<br></div><div class="im">
madwifi req WPA IE - hexdump(len=256): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 00 00 00 00 00 00 00 00 00 00 00 00 0<br>
madwifi req RSN IE - hexdump(len=256): 00 00 c3 46 e0 00 00 00 00 00 00 04 da 28 c0 15 a8 24 c3 46 fe 38 c3 5e 42 40 00 00 00 00 00 00 00 01 ff ff 6<br>ath0: STA 00:92:c3:80:05:7d WPA: event 1 notification<br>madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0<br>
ath0: STA 00:92:c3:80:05:7d WPA: start authentication<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITIALIZE<br>madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0<br></div>madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=0<div class="im">
<br>
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long<br></div><div class="im">madwifi_set_sta_authorized: Failed to unauthorize STA 00:92:c3:80:05:7d<br>ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: unauthorizing port<br>Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).<br>
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state IDLE<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state AUTHENTICATION<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state AUTHENTICATION2<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITPSK<br>
WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKSTART<br>ath0: STA 00:92:c3:80:05:7d WPA: sending 1/4 msg of 4-Way Handshake<br>WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)<br>
TX EAPOL - hexdump(len=113): 00 92 c3 80 05 7d 00 60 b3 e9 24 c5 88 8e 02 03 00 5f fe 00 89 00 20 00 00 00 00 00 00 00 01 51 22 1b 9f a5 66 46 69 e0<br>IEEE 802.1X: 123 bytes from 00:92:c3:80:05:7d<br> IEEE 802.1X: version=1 type=3 length=119<br>
ath0: STA 00:92:c3:80:05:7d WPA: received EAPOL-Key frame (2/4 Pairwise)<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKCALCNEGOTIATING<br>WPA: PTK derivation - A1=00:60:b3:e9:24:c5 A2=00:92:c3:80:05:7d<br>WPA: PMK - hexdump(len=32): [REMOVED]<br>
WPA: PTK - hexdump(len=64): [REMOVED]<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKCALCNEGOTIATING2<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKINITNEGOTIATING<br></div>madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1<br>
ioctl[unknown???]: Invalid argument<div class="im"><br>madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff key_idx 1)<br>ath0: STA 00:92:c3:80:05:7d WPA: sending 3/4 msg of 4-Way Handshake<br>WPA: Send EAPOL(version=1 secure=0 mic=1 ack=1 install=1 pairwise=8 kde_len=24 keyidx=0 encr=0)<br>
TX EAPOL - hexdump(len=137): 00 92 c3 80 05 7d 00 60 b3 e9 24 c5 88 8e 02 03 00 77 fe 01 c9 00 20 00 00 00 00 00 00 00 02 51 22 1b 9f a5 66 46 69 e2<br>IEEE 802.1X: 99 bytes from 00:92:c3:80:05:7d<br> IEEE 802.1X: version=1 type=3 length=95<br>
ath0: STA 00:92:c3:80:05:7d WPA: received EAPOL-Key frame (4/4 Pairwise)<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKINITDONE<br></div>madwifi_set_key: alg=TKIP addr=00:92:c3:80:05:7d key_idx=0<br>madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=1<div class="im">
<br>
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long<br></div><div class="im">madwifi_set_sta_authorized: Failed to authorize STA 00:92:c3:80:05:7d<br>ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: authorizing port<br></div>
<div class="im">Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).<br></div><div class="im">
ath0: STA 00:92:c3:80:05:7d RADIUS: starting accounting session 000007FA-00000000<br></div>madwifi_sta_clear_stats: addr=00:92:c3:80:05:7d<div class="im"><br>ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long<br></div>
<div class="im">madwifi_sta_clear_stats: Failed to clear STA stats (addr 00:92:c3:80:05:7d)<br>
ath0: STA 00:92:c3:80:05:7d WPA: pairwise key handshake completed (WPA)<br>WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING<br></div>madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1<br>ioctl[unknown???]: Invalid argument<div class="im">
<br>
madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff key_idx 1)<br>ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake<br>WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0 kde_len=32 keyidx=1 encr=1)<br>
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]<br>TX EAPOL - hexdump(len=145): 00 92 c3 80 05 7d 00 60 b3 e9 24 c5 88 8e 02 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 03 51 22 1b 9f a5 66 46 69 e9<br>ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout<br>
</div><div class="im">
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING<br></div>madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1<br>ioctl[unknown???]: Invalid argument<div class="im"><br>madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff key_idx 1)<br>
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake<br>WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0 kde_len=32 keyidx=1 encr=1)<br>Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]<br>
</div><div class="im">
TX EAPOL - hexdump(len=145): 00 92 c3 80 05 7d 00 60 b3 e9 24 c5 88 8e 02 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 04 51 22 1b 9f a5 66 46 69 ee<br></div><div class="im">ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout<br>
</div><div class="im">WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING<br></div>
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1<br>ioctl[unknown???]: Invalid argument<div class="im"><br>madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff key_idx 1)<br>ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake<br>
WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0 kde_len=32 keyidx=1 encr=1)<br>Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]<br></div><div class="im">TX EAPOL - hexdump(len=145): 00 92 c3 80 05 7d 00 60 b3 e9 24 c5 88 8e 02 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 05 51 22 1b 9f a5 66 46 69 e3<br>
</div><div class="im">
ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout<br></div><div class="im">WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING<br></div>madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1<br>ioctl[unknown???]: Invalid argument<div class="im">
<br>madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff key_idx 1)<br>
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake<br>WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0 kde_len=32 keyidx=1 encr=1)<br>Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]<br>
</div><div class="im">
TX EAPOL - hexdump(len=145): 00 92 c3 80 05 7d 00 60 b3 e9 24 c5 88 8e 02 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 06 51 22 1b 9f a5 66 46 69 ea<br></div><div class="im">ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout<br>
</div><div class="im">WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING<br>
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state KEYERROR<br>WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECT<br>hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA 00:92:c3:80:05:7d reason 2<br>
</div>
madwifi_sta_deauth: addr=00:92:c3:80:05:7d reason_code=2<div class="im"><br>ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long<br></div>madwifi_sta_deauth: Failed to deauth STA (addr 00:92:c3:80:05:7d reason 2)<div class="im">
<br>WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state IDLE<br></div><div class="im">
WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECTED<br></div><div class="im">WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITIALIZE<br>madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0<br></div>madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=0<div class="im">
<br>
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long<br></div><div class="im">madwifi_set_sta_authorized: Failed to unauthorize STA 00:92:c3:80:05:7d<br>ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: unauthorizing port<br>Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).<br>
</div><div class="im">
ath0: STA 00:92:c3:80:05:7d IEEE 802.11: deauthenticated due to local deauth request<br></div>Wireless event: cmd=0x8c02 len=99<div class="im"><br>Custom wireless event: 'STA-TRAFFIC-STAT<br></div>...........<br><br>
<div class="gmail_quote"><div class="im">2010/1/9 Pavel Roskin <span dir="ltr"><<a href="mailto:proski@gnu.org" target="_blank">proski@gnu.org</a>></span><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Wed, 2010-01-06 at 11:16 +0800, Peter Zhou wrote:<div><div></div><div class="h5">
<br>
<br>
> ioctl[unknown???]: Invalid argument<br>
> madwifi_process_wpa_ie: Failed to get WPA/RSN IE<br>
<br>
</div></div></div><div><div></div><div class="h5">It looks like the IEEE80211_IOCTL_GETWPAIE request is failing with<br>
-EINVAL. MadWifi would process it in ieee80211_ioctl_getwpaie(), which<br>
would fail if the request size mismatches what MadWifi expects.<br>
<br>
Maybe sizeof(struct ieee80211req_wpaie) is different in userspace and in<br>
the kernel for your platform?<br>
<br>
Perhaps the easiest solution would be to apply this patch to MadWifi and<br>
recompile both MadWifi and hostapd. Please report if it made any<br>
difference for you.<br>
<br>
If it doesn't help, please print iwr->u.data.length and sizeof(wpaie) in<br>
the beginning of ieee80211_ioctl_getwpaie() in MadWifi.<br>
<br>
Index: net80211/ieee80211_ioctl.h<br>
===================================================================<br>
--- net80211/ieee80211_ioctl.h (revision 4103)<br>
+++ net80211/ieee80211_ioctl.h (working copy)<br>
@@ -287,7 +287,7 @@<br>
u_int8_t wpa_macaddr[IEEE80211_ADDR_LEN];<br>
u_int8_t wpa_ie[IEEE80211_MAX_OPT_IE];<br>
u_int8_t rsn_ie[IEEE80211_MAX_OPT_IE];<br>
-};<br>
+} __packed;<br>
<br>
/*<br>
* Retrieve per-node statistics.<br>
<br>
--<br>
Regards,<br>
<font color="#888888">Pavel Roskin<br>
</font></div></div></blockquote></div><br>
</blockquote></div><br>