rt73usb (rt2x00): WEP decrypt failed (skb too large)

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4650

svenning

05-03-2008 22:50:59

Using the rt73usb driver in the current rt2x00 git tree, I couldn't get WEP connections to work. dmesg reported

WEP decrypt failed (ICV)

It associated with the AP alright, but all data packets got dropped (and yes, I used the correct WEP key wink )

I traced it down to being a problem with the size of the skb as it is seen by net/mac80211/wep.cieee80211_wep_decrypt(); the skb always contained 2 bytes too many, making the CRC (ICV) check fail.

I'm sure this function is not the correct place to fix the bug, but I tried to insert the line

skb_trim(skb, skb->len - 2);

at the start of that function, and voila - everything worked (well, at least in managed mode wink ).

I hope someone with more insight into the innards of the code will be able to come up with a better fix )


Svenning

IvD

05-03-2008 23:01:55

You mean this patch
http//git.kernel.org/?p=linux/kernel/g ... 87347f48e5

which was applied earlier today?

svenning

05-03-2008 23:39:47

Ah, yes, this looks like the patch I needed )

It must have been submitted just after I updated my tree, so I missed it.

Sorry for the noise oops


Svenning

IvD

05-03-2008 23:44:48

hehe, no problem. with patches or code suggestions it is better to post them and let me filter out the good ones, that way I can at least see where things are going wrong and it helps me with bugfixing. )