Re: Weird wireless/wpa_supplicant screw-up.

From: Johannes Berg
Date: Fri Mar 12 2010 - 22:09:11 EST


On Fri, 2010-03-12 at 16:49 -0500, Valdis.Kletnieks@xxxxxx wrote:

> OK, getting closer ;)

No ... you're not getting closer at all ... you ignored my second email.

> in net/wireless/wext-compat.c, we have this in cfg80211_wext_giwencode()
> after I add some printk's:
>
> printk(KERN_INFO "In giwencode idx=%d keys=%x cipher=%x\n", idx, wdev->wext.keys, wdev->wext.keys->params[idx].cipher);
> if (!wdev->wext.keys || !wdev->wext.keys->params[idx].cipher) {
> printk(KERN_INFO "And we're going home...\n");
> erq->flags |= IW_ENCODE_DISABLED;
> erq->length = 0;
> return 0;
> }
>
> which produces
>
> [ 151.401195] In giwencode idx=0 keys=1d023600 cipher=0
> [ 151.401198] And we're going home...

No ... look at _all_ that it produces.

[ 98.592575] In giwencode idx=0 keys=ffff88001b304000 cipher=0
[ 98.592580] And we're going home...
*****
[ 98.592633] In giwencode idx=1 keys=ffff88001b304000 cipher=fac04
*****
[ 98.592749] In giwencode idx=2 keys=ffff88001b304000 cipher=0
[ 98.592751] And we're going home...
[ 98.592803] In giwencode idx=3 keys=ffff88001b304000 cipher=0
[ 98.592805] And we're going home...
[ 98.592856] In giwencode idx=0 keys=ffff88001b304000 cipher=0
[ 98.592859] And we're going home...

See? It reports one key which is the RX-only group key which is
absolutely correct.

> So the root cause has something to do with params[idx].cipher being unset.

Not at all.

GIWENCODE is 100% unsuitable for WPA. Just forget about "iwlist key".
And then we'd like to know what the actual problem is.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/