WPA-PSK problem on ARM
Duncan Grove
duncan.grove
Tue Oct 5 00:13:41 PDT 2004
Hi Willy, Jouni,
Thanks for that. The new 0.2.5 release works fine.
Regards,
Duncan
hostap at shmoo.com wrote:
> On Fri, Oct 01, 2004 at 10:04:08PM -0700, Jouni Malinen wrote:
>
>>> On Fri, Oct 01, 2004 at 06:02:28PM +0930, Duncan Grove wrote:
>>
>>
>>>> > During scanning wpa_supplicant decides to skip my AP, like this:
>>>> >
>>>> > 0: 00:11:92:a1:92:a0 ssid='8021xtst' wpa_ie_len=0 rsn_ie_len=0
>>>> > skip - no WPA/RSN IE
>>>
>>>
>>>> > ... despite the fact that iwlist (from wireless_tools.27) shows a wpa_ie:
>>>
>>>
>>> This sounds like a possible alignment issue in scan result parsing in
>>> wpa_supplicant. I'll need to take a closer look at how the netlink
>>> message is parsed.
>>
>>
>Indeed, there were couple of places where scan results read unaligned
>data. These are now fixed in development version in CVS. Please let me
>know if the current development snapshot fixes the problems you saw with
>the earlier version.
>
>
Willy Sagefalk wrote:
>Hi
>
>I have seen the same issue when testing WPA on a platform with Hermes 2
>+ ARM. I found one alignement issue in driver_wext.c. The following fix
>seems to solve the problem.
>
>Brgds Willy
>
>static void wpa_driver_wext_event_wireless(void *ctx, char *data, int
>len)
>{
> struct iw_event *iwe, iwe2;
> char *pos, *end, *custom, *buf;
>
> pos = data;
> end = data + len;
>
> while (pos + IW_EV_LCP_LEN <= end) {
> /* Fix */
> memcpy ((void *)&iwe2,(void*)pos,sizeof(struct
>iw_event));
> iwe = &iwe2;
> // iwe = (struct iw_event *) pos;
>
>
>int wpa_driver_wext_get_scan_results(const char *ifname,
> struct wpa_scan_result *results,
> size_t max_size)
>{
> struct iwreq iwr;
> int s, ap_num = 0, first, maxrate;
> u8 res_buf[IW_SCAN_MAX_DATA];
> struct iw_event *iwe,iwe2;
> char *pos, *end, *custom;
> size_t len, clen;
>
> memset(results, 0, max_size * sizeof(struct wpa_scan_result));
> s = socket(PF_INET, SOCK_DGRAM, 0);
> if (s < 0) {
> perror("socket[PF_INET,SOCK_DGRAM]");
> return -1;
> }
>
> memset(&iwr, 0, sizeof(iwr));
> strncpy(iwr.ifr_name, ifname, IFNAMSIZ);
> iwr.u.data.pointer = res_buf;
> iwr.u.data.length = IW_SCAN_MAX_DATA;
>
> if (ioctl(s, SIOCGIWSCAN, &iwr) < 0) {
> perror("ioctl[SIOCGIWSCAN]");
> close(s);
> return -1;
> }
>
> len = iwr.u.data.length;
> ap_num = 0;
> first = 1;
>
> pos = res_buf;
> end = res_buf + len;
>
> while (pos + IW_EV_LCP_LEN <= end) {
> int ssid_len;
> /* Fix */
> memcpy ((void *)&iwe2,(void*)pos,sizeof(struct iw_event));
> iwe = &iwe2;
>
>// iwe = (struct iw_event *) pos;
>
>
>>-----Original Message-----
>>From: hostap-bounces+willy=axis.com at shmoo.com
>>[mailto:hostap-bounces+willy=axis.com at shmoo.com] On Behalf Of
>>Duncan Grove
>>Sent: den 1 oktober 2004 10:32
>>To: hostap at shmoo.com
>>Subject: WPA-PSK problem on ARM
>>
>>Hi,
>>
>>I recently read a couple of posts about possible endian-ness
>>issues with the WPA support on ARM. I've also come across a
>>problem with WPA on ARM, although I'm not sure if it's related...
>>
>>I've just tried wpa_supplicant 0.2.4 and the 0.2.5 beta on an
>>Ipaq that's running a derivative of the latest handhelds.org
>>2.4.19-rmk6-pxa1-hh37 kernel, although I've dragged a lot of
>>2.4.26-and-beyond network and wireless card driver code into
>>the tree.
>>While the hostap-driver works with an unencrypted base
>>station, I couldn't get wpa_supplicant to connect to a
>>WPA-PSK base station. When I rebuilt everything on an x86 box
>>it connected fine. I was using a D-link DWL-650 with station
>>firmware 1.7.1.
>>
>>During scanning wpa_supplicant decides to skip my AP, like this:
>>
>>Received 262 bytes of scan results (1 BSSes) Scan results: 1
>>Selecting BSS from priority group 0
>>0: 00:11:92:a1:92:a0 ssid='8021xtst' wpa_ie_len=0 rsn_ie_len=0
>> skip - no WPA/RSN IE
>>No suitable AP found.
>>Setting scan request: 5 sec 0 usec
>>
>>... despite the fact that iwlist (from wireless_tools.27)
>>shows a wpa_ie:
>>
>>~/testing # iwlist wlan0 scan
>> Cell 02 - Address: 00:11:92:A1:92:A0
>> ESSID:"8021xtst"
>> Encryption key:on
>>
>>Extra:wpa_ie=dd160050f20101000050f20201000050f20201000050f202
>>
>>Does anyone have any ideas about what might be going wrong?
>>(I've attached more complete logs below). Or where I should
>>start digging in the source code?
>>
>>(Aside: I'm intending to move to WPA2 with EAP and AES when I
>>can find a commercial base station that supports them... is
>>the above problem likely to reappear then?)
>>
>>Thanks,
>>Duncan
>>
>>
More information about the Hostap
mailing list