linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix for incorrect sequence number on hostapd injected frames
@ 2009-10-24 18:55 Björn Smedman
  2009-10-25 18:59 ` Johannes Berg
  2009-10-27 11:09 ` AW: " Joerg Pommnitz
  0 siblings, 2 replies; 4+ messages in thread
From: Björn Smedman @ 2009-10-24 18:55 UTC (permalink / raw)
  To: linville
  Cc: linux-wireless, Johannes Berg, Jouni Malinen, Joerg Pommnitz,
	Will Dyson

When hostapd injects a frame, e.g. an authentication or association
response, mac80211 looks for a suitable access point virtual interface
to associate the frame with based on its source address. This makes it
possible e.g. to correctly assign sequence numbers to the frames.

A small typo in the ethernet address comparison statement caused a
failure to find a suitable ap interface. Sequence numbers on such
frames where therefore left unassigned causing some clients
(especially windows-based 11b/g clients) to reject them and fail to
authenticate or associate with the access point. This patch fixes the
typo in the address comparison statement.

Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>
---
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index db4bda6..eaa4118 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1445,7 +1445,7 @@ static void ieee80211_xmit(struct
ieee80211_sub_if_data *sdata,
                                if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
                                        continue;
                                if (compare_ether_addr(tmp_sdata->dev->dev_addr,
-                                                      hdr->addr2)) {
+                                                      hdr->addr2) == 0) {
                                        dev_hold(tmp_sdata->dev);
                                        dev_put(sdata->dev);
                                        sdata = tmp_sdata;

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

* Re: [PATCH] mac80211: fix for incorrect sequence number on hostapd injected frames
  2009-10-24 18:55 [PATCH] mac80211: fix for incorrect sequence number on hostapd injected frames Björn Smedman
@ 2009-10-25 18:59 ` Johannes Berg
  2009-10-26 12:18   ` Michael Buesch
  2009-10-27 11:09 ` AW: " Joerg Pommnitz
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-10-25 18:59 UTC (permalink / raw)
  To: Björn Smedman
  Cc: linville, linux-wireless, Jouni Malinen, Joerg Pommnitz,
	Will Dyson

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

On Sat, 2009-10-24 at 20:55 +0200, Björn Smedman wrote:
> When hostapd injects a frame, e.g. an authentication or association
> response, mac80211 looks for a suitable access point virtual interface
> to associate the frame with based on its source address. This makes it
> possible e.g. to correctly assign sequence numbers to the frames.
> 
> A small typo in the ethernet address comparison statement caused a
> failure to find a suitable ap interface. Sequence numbers on such
> frames where therefore left unassigned causing some clients
> (especially windows-based 11b/g clients) to reject them and fail to
> authenticate or associate with the access point. This patch fixes the
> typo in the address comparison statement.
> 
> Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

and Cc: stable@kernel.org I think

> ---
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index db4bda6..eaa4118 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1445,7 +1445,7 @@ static void ieee80211_xmit(struct
> ieee80211_sub_if_data *sdata,
>                                 if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
>                                         continue;
>                                 if (compare_ether_addr(tmp_sdata->dev->dev_addr,
> -                                                      hdr->addr2)) {
> +                                                      hdr->addr2) == 0) {
>                                         dev_hold(tmp_sdata->dev);
>                                         dev_put(sdata->dev);
>                                         sdata = tmp_sdata;
> 


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH] mac80211: fix for incorrect sequence number on hostapd injected frames
  2009-10-25 18:59 ` Johannes Berg
@ 2009-10-26 12:18   ` Michael Buesch
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Buesch @ 2009-10-26 12:18 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Björn Smedman, linville, linux-wireless, Jouni Malinen,
	Joerg Pommnitz, Will Dyson

On Sunday 25 October 2009 19:59:16 Johannes Berg wrote:
> On Sat, 2009-10-24 at 20:55 +0200, Björn Smedman wrote:
> > When hostapd injects a frame, e.g. an authentication or association
> > response, mac80211 looks for a suitable access point virtual interface
> > to associate the frame with based on its source address. This makes it
> > possible e.g. to correctly assign sequence numbers to the frames.
> > 
> > A small typo in the ethernet address comparison statement caused a
> > failure to find a suitable ap interface. Sequence numbers on such
> > frames where therefore left unassigned causing some clients
> > (especially windows-based 11b/g clients) to reject them and fail to
> > authenticate or associate with the access point. This patch fixes the
> > typo in the address comparison statement.
> > 
> > Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>
> 
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> 
> and Cc: stable@kernel.org I think
> 
> > ---
> > diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> > index db4bda6..eaa4118 100644
> > --- a/net/mac80211/tx.c
> > +++ b/net/mac80211/tx.c
> > @@ -1445,7 +1445,7 @@ static void ieee80211_xmit(struct
> > ieee80211_sub_if_data *sdata,
> >                                 if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
> >                                         continue;
> >                                 if (compare_ether_addr(tmp_sdata->dev->dev_addr,
> > -                                                      hdr->addr2)) {
> > +                                                      hdr->addr2) == 0) {
> >                                         dev_hold(tmp_sdata->dev);
> >                                         dev_put(sdata->dev);
> >                                         sdata = tmp_sdata;
> > 
> 
> 

The following patch cleanly applies to 2.6.31.5-stable and is tested.

Index: linux-2.6.31/net/mac80211/tx.c
===================================================================
--- linux-2.6.31.orig/net/mac80211/tx.c	2009-10-26 09:15:20.000000000 +0100
+++ linux-2.6.31/net/mac80211/tx.c	2009-10-26 09:16:35.000000000 +0100
@@ -1478,7 +1478,7 @@
 				if (sdata->vif.type != NL80211_IFTYPE_AP)
 					continue;
 				if (compare_ether_addr(sdata->dev->dev_addr,
-						       hdr->addr2)) {
+						       hdr->addr2) == 0) {
 					dev_hold(sdata->dev);
 					dev_put(odev);
 					osdata = sdata;


-- 
Greetings, Michael.

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

* AW: [PATCH] mac80211: fix for incorrect sequence number on hostapd  injected frames
  2009-10-24 18:55 [PATCH] mac80211: fix for incorrect sequence number on hostapd injected frames Björn Smedman
  2009-10-25 18:59 ` Johannes Berg
@ 2009-10-27 11:09 ` Joerg Pommnitz
  1 sibling, 0 replies; 4+ messages in thread
From: Joerg Pommnitz @ 2009-10-27 11:09 UTC (permalink / raw)
  To: Björn Smedman, linville
  Cc: linux-wireless, Johannes Berg, Jouni Malinen, Will Dyson

I just applied the patch. So far, everything looks fine.

Thanks
  Joerg

----- Ursprüngliche Mail ----

> Von: Björn Smedman <bjorn.smedman@venatech.se>
> An: linville@tuxdriver.com
> CC: linux-wireless@vger.kernel.org; Johannes Berg <johannes@sipsolutions.net>; Jouni Malinen <j@w1.fi>; Joerg Pommnitz <pommnitz@yahoo.com>; Will Dyson <will.dyson@gmail.com>
> Gesendet: Samstag, den 24. Oktober 2009, 20:55:09 Uhr
> Betreff: [PATCH] mac80211: fix for incorrect sequence number on hostapd  injected frames
> 
> When hostapd injects a frame, e.g. an authentication or association
> response, mac80211 looks for a suitable access point virtual interface
> to associate the frame with based on its source address. This makes it
> possible e.g. to correctly assign sequence numbers to the frames.
> 
> A small typo in the ethernet address comparison statement caused a
> failure to find a suitable ap interface. Sequence numbers on such
> frames where therefore left unassigned causing some clients
> (especially windows-based 11b/g clients) to reject them and fail to
> authenticate or associate with the access point. This patch fixes the
> typo in the address comparison statement.
> 
> Signed-off-by: Björn Smedman 

Tested-by: Joerg Pommnitz <pommnitz@yahoo.com>

> ---
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index db4bda6..eaa4118 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1445,7 +1445,7 @@ static void ieee80211_xmit(struct
> ieee80211_sub_if_data *sdata,
>                                 if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
>                                         continue;
>                                 if (compare_ether_addr(tmp_sdata->dev->dev_addr,
> -                                                      hdr->addr2)) {
> +                                                      hdr->addr2) == 0) {
>                                         dev_hold(tmp_sdata->dev);
>                                         dev_put(sdata->dev);
>                                         sdata = tmp_sdata;



      

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

end of thread, other threads:[~2009-10-27 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-24 18:55 [PATCH] mac80211: fix for incorrect sequence number on hostapd injected frames Björn Smedman
2009-10-25 18:59 ` Johannes Berg
2009-10-26 12:18   ` Michael Buesch
2009-10-27 11:09 ` AW: " Joerg Pommnitz

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).