2011-01-10 23:08:14

by Andy Pyles

[permalink] [raw]
Subject: packet injection not working on rt2800usb, ath9k

I'm using linux-wireless snapshot from December, 2010 with the
following driver: rt2800usb

The linux-wireless snapshot for ath9k is from last summer ( July)

As an example I'm building a program based on:
http://wireless.kernel.org/en/users/Documentation/packetspammer

Steps to test:
( Sender Host A rt2800usb: usbid: Bus 001 Device 002: ID 148f:3070
Ralink Technology, Corp. )
1.) sudo iw phy phy0 interface add moni0 type monitor
2.) sudo iw dev moni0 set channel 11
3.) run packet injector via: pcap_inject()
4.) run tcpdump on moni0 and observe injected packet

( Receiver Host B: 04:02.0 Network controller: Atheros Communications
Inc. AR5008 Wireless Network Adapter (rev 01))
1.) sudo iw phy phy0 interface add moni0 type monitor
2.) sudo iw dev moni0 set channel 11
4.) run tcpdump on moni0 injected packet NOT received.

Sanity test1: When I send a packet from A to B, packet is observed on moni0
Sanity test2: ran standalone packetspammer with no modifications with
the same result.

Question: Is this operation supported on these two devices? If not,
what device can you recommend a device where this does work?

regards,
Andy


2011-01-11 11:52:13

by Jouni Malinen

[permalink] [raw]
Subject: Re: packet injection not working on rt2800usb, ath9k

On Mon, Jan 10, 2011 at 06:08:13PM -0500, Andy Pyles wrote:
> I'm using linux-wireless snapshot from December, 2010 with the
> following driver: rt2800usb
>
> The linux-wireless snapshot for ath9k is from last summer ( July)

> Question: Is this operation supported on these two devices? If not,
> what device can you recommend a device where this does work?

I do not know about rt2800usb, but monitor mode and packet injection
works with ath9k. I'm not sure how packetspammer is doing this, but at
least use of Linux packet socket and simple radiotap header works fine
in my tests. In addition, it could be useful to update your ath9k driver
to make sure you are running with all the latest fixes.

--
Jouni Malinen PGP id EFC895FA

2011-01-11 20:49:07

by Andy Pyles

[permalink] [raw]
Subject: Re: packet injection not working on rt2800usb, ath9k

> I do not know about rt2800usb, but monitor mode and packet injection
> works with ath9k. I'm not sure how packetspammer is doing this, but at
> least use of Linux packet socket and simple radiotap header works fine
> in my tests. In addition, it could be useful to update your ath9k driver
> to make sure you are running with all the latest fixes.

Thanks for the tip! After some debugging, it turns out that my
radiotap header is not getting parsed correctly
in ./net/mac80211/tx.c:__ieee80211_parse_tx_radiotap()

Would you mind sending me the radiotap header you are using?

2011-01-12 10:07:05

by Jouni Malinen

[permalink] [raw]
Subject: Re: packet injection not working on rt2800usb, ath9k

On Tue, Jan 11, 2011 at 03:49:06PM -0500, Andy Pyles wrote:
> Thanks for the tip! After some debugging, it turns out that my
> radiotap header is not getting parsed correctly
> in ./net/mac80211/tx.c:__ieee80211_parse_tx_radiotap()
>
> Would you mind sending me the radiotap header you are using?

http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=blob_plain;f=wlantest/inject.c;hb=HEAD

--
Jouni Malinen PGP id EFC895FA