linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Packetspammer and iwlwifi fragility
@ 2007-03-07 13:05 Andy Green
  2007-03-07 14:10 ` Michael Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Green @ 2007-03-07 13:05 UTC (permalink / raw)
  To: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]

Hi folks -

Attached is a small tool called "packetspammer" I just made from ripping 
bits out of penumbrad, it sends 256-byte broadcast packets using the 
management interface at a rate you define.  It only depends on 
libpcap-devel to compile.

# packetspammer <wlan0-type-interface> <delay between packets in us>

eg

# packetspammer wlan0 0

packetspammer brings up the management interface and determines which 
one it is using /sys, the paths in there might need meddling with if the 
very recent /sys clearout patch stuff is in your kernel, but it is 
working with Linville's FC7 #3 2961 kernel which is what I am using 
here.  Then it loops using libpcap to spam broadcast packets down the 
management interface.

So I try packetspammer on iwlwifi and zd1211rw-mac80211: both are 
associated to a WPA protected network during the test and a second 
machine in Monitor mode looks on.

  * zd1211rw-mac80211: packets spew out at any delay, including 0. 
Remains associated during the testing.  The netdev start and stop stuff 
must regulate the packet flow.  Good!

  * iwlwifi: drops dead without dmesg error after 55 - 89 packets (0us - 
1000us delay).  Association lost, no further packets are sent until the 
thing is rmmodded, will not reassociate with wpa_supplicant restart 
unless it is rmmodded and insmodded back in.  Even at 1s delay between 
packets, eventually it falls over.  Bad!

Also notice that packets cannot be sent by packetspammer until the 
interface is brought up, which I guess is reasonable enough, but also I 
found not until the interface was associated with a WPA network, which 
is a problem if the plan is to use the injection action to do the work 
of association in userspace.

I hope maybe this can help validate and find the source of any fragility.

-Andy

[-- Attachment #2: packetspammer-0.1.tar.gz --]
[-- Type: application/x-gzip, Size: 15704 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Packetspammer and iwlwifi fragility
  2007-03-07 13:05 Packetspammer and iwlwifi fragility Andy Green
@ 2007-03-07 14:10 ` Michael Wu
  2007-03-07 15:09   ` Andy Green
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Wu @ 2007-03-07 14:10 UTC (permalink / raw)
  To: Andy Green; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

On Wednesday 07 March 2007 08:05, Andy Green wrote:
> Also notice that packets cannot be sent by packetspammer until the
> interface is brought up, which I guess is reasonable enough, but also I
> found not until the interface was associated with a WPA network, which
> is a problem if the plan is to use the injection action to do the work
> of association in userspace.
>
There is a hostap/prism2 sub-ioctl to enable userspace mlme mode, which should 
fix that issue. Look around in ieee80211_ioctl.c for 
PRISM2_IOCTL_PRISM2_PARAM, ieee80211_ioctl_prism2_param, and 
PRISM2_PARAM_USER_SPACE_MLME for hints. These sub-ioctls are, of course, 
quite evil and need to be replaced, but it's a little better than hacking 
mac80211 to start with user_space_mlme enabled by default.

-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Packetspammer and iwlwifi fragility
  2007-03-07 14:10 ` Michael Wu
@ 2007-03-07 15:09   ` Andy Green
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Green @ 2007-03-07 15:09 UTC (permalink / raw)
  To: Michael Wu; +Cc: linux-wireless

Michael Wu wrote:

> On Wednesday 07 March 2007 08:05, Andy Green wrote:
>> Also notice that packets cannot be sent by packetspammer until the
>> interface is brought up, which I guess is reasonable enough, but also I
>> found not until the interface was associated with a WPA network, which
>> is a problem if the plan is to use the injection action to do the work
>> of association in userspace.
>>
> There is a hostap/prism2 sub-ioctl to enable userspace mlme mode, which should 
> fix that issue. Look around in ieee80211_ioctl.c for 
> PRISM2_IOCTL_PRISM2_PARAM, ieee80211_ioctl_prism2_param, and 
> PRISM2_PARAM_USER_SPACE_MLME for hints. These sub-ioctls are, of course, 
> quite evil and need to be replaced, but it's a little better than hacking 
> mac80211 to start with user_space_mlme enabled by default.

Thanks for that tip Michael, I found it needed only 
PRISM2_PARAM_ALLOW_BROADCAST_ALWAYS to work without association.  So you 
  only need to

  - bring the interface up, and

  - set the channel

before running it now.  The updated version can be had here:

http://warmcat.com/packetspammer-0.2.tar.gz

-Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-07 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-07 13:05 Packetspammer and iwlwifi fragility Andy Green
2007-03-07 14:10 ` Michael Wu
2007-03-07 15:09   ` Andy Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).