madwifi_process_wpa_ie: Failed to get WPA/RSN IE

Peter Zhou peterzhou2003
Sun Jan 10 19:17:13 PST 2010


Thank you for your reply.

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.

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.

Thank you.
==========================================================================
............

ath0: Setup of interface done.
l2_packet_receive - recvfrom: Network is down
Wireless event: cmd=0x8c03 len=20
ath0: STA 00:92:c3:80:05:7d IEEE
=======ieee80211_ioctl_getwpaie() :iwr->u.data.length=518,
sizeof(wpaie)=518.
 802.11: associated
  New STA
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
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
ath0: STA 00:92:c3:80:05:7d WPA: event 1 notification
madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0
ath0: STA 00:92:c3:80:05:7d WPA: start authentication
WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0
madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=0

ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
madwifi_set_sta_authorized: Failed to unauthorize STA 00:92:c3:80:05:7d
ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: unauthorizing port
Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state IDLE
WPA: 00:92:c3:80:05:7d WPA_PTK entering state AUTHENTICATION
WPA: 00:92:c3:80:05:7d WPA_PTK entering state AUTHENTICATION2
WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITPSK
WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKSTART
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8
kde_len=0 keyidx=0 encr=0)
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
IEEE 802.1X: 123 bytes from 00:92:c3:80:05:7d
   IEEE 802.1X: version=1 type=3 length=119
ath0: STA 00:92:c3:80:05:7d WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=00:60:b3:e9:24:c5 A2=00:92:c3:80:05:7d
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKINITNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ioctl[unknown???]: Invalid argument

madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff
key_idx 1)
ath0: STA 00:92:c3:80:05:7d WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=1 ack=1 install=1 pairwise=8
kde_len=24 keyidx=0 encr=0)
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
IEEE 802.1X: 99 bytes from 00:92:c3:80:05:7d
   IEEE 802.1X: version=1 type=3 length=95
ath0: STA 00:92:c3:80:05:7d WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: 00:92:c3:80:05:7d WPA_PTK entering state PTKINITDONE
madwifi_set_key: alg=TKIP addr=00:92:c3:80:05:7d key_idx=0
madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=1

ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
madwifi_set_sta_authorized: Failed to authorize STA 00:92:c3:80:05:7d
ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: authorizing port
Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).
ath0: STA 00:92:c3:80:05:7d RADIUS: starting accounting session
000007FA-00000000
madwifi_sta_clear_stats: addr=00:92:c3:80:05:7d

ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
madwifi_sta_clear_stats: Failed to clear STA stats (addr 00:92:c3:80:05:7d)
ath0: STA 00:92:c3:80:05:7d WPA: pairwise key handshake completed (WPA)
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ioctl[unknown???]: Invalid argument

madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff
key_idx 1)
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake
WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0
kde_len=32 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
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
ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ioctl[unknown???]: Invalid argument

madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff
key_idx 1)
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake
WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0
kde_len=32 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
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
ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ioctl[unknown???]: Invalid argument

madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff
key_idx 1)
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake
WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0
kde_len=32 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
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
ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ioctl[unknown???]: Invalid argument

madwifi_get_seqnum: Failed to get encryption data (addr ff:ff:ff:ff:ff:ff
key_idx 1)
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake
WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0
kde_len=32 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
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
ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state KEYERROR
WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECT
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA
00:92:c3:80:05:7d reason 2
madwifi_sta_deauth: addr=00:92:c3:80:05:7d reason_code=2

ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
madwifi_sta_deauth: Failed to deauth STA (addr 00:92:c3:80:05:7d reason 2)

WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state IDLE
WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECTED
WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0
madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=0

ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
madwifi_set_sta_authorized: Failed to unauthorize STA 00:92:c3:80:05:7d
ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: unauthorizing port
Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).
ath0: STA 00:92:c3:80:05:7d IEEE 802.11: deauthenticated due to local deauth
request
Wireless event: cmd=0x8c02 len=99

Custom wireless event: 'STA-TRAFFIC-STAT
...........

2010/1/9 Pavel Roskin <proski at gnu.org>

> On Wed, 2010-01-06 at 11:16 +0800, Peter Zhou wrote:
>
> > ioctl[unknown???]: Invalid argument
> > madwifi_process_wpa_ie: Failed to get WPA/RSN IE
>
> It looks like the IEEE80211_IOCTL_GETWPAIE request is failing with
> -EINVAL.  MadWifi would process it in ieee80211_ioctl_getwpaie(), which
> would fail if the request size mismatches what MadWifi expects.
>
> Maybe sizeof(struct ieee80211req_wpaie) is different in userspace and in
> the kernel for your platform?
>
> Perhaps the easiest solution would be to apply this patch to MadWifi and
> recompile both MadWifi and hostapd.  Please report if it made any
> difference for you.
>
> If it doesn't help, please print iwr->u.data.length and sizeof(wpaie) in
> the beginning of ieee80211_ioctl_getwpaie() in MadWifi.
>
> Index: net80211/ieee80211_ioctl.h
> ===================================================================
> --- net80211/ieee80211_ioctl.h  (revision 4103)
> +++ net80211/ieee80211_ioctl.h  (working copy)
> @@ -287,7 +287,7 @@
>        u_int8_t        wpa_macaddr[IEEE80211_ADDR_LEN];
>        u_int8_t        wpa_ie[IEEE80211_MAX_OPT_IE];
>        u_int8_t        rsn_ie[IEEE80211_MAX_OPT_IE];
> -};
> +} __packed;
>
>  /*
>  * Retrieve per-node statistics.
>
> --
> Regards,
> Pavel Roskin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20100111/2f571f7e/attachment.htm 



More information about the Hostap mailing list