Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx()
@ 2011-05-09 14:19 Luciano Coelho
  2011-05-09 14:46 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Luciano Coelho @ 2011-05-09 14:19 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes

This seems to be a leftover from the old days, when we didn't support
any frames that didn't contain the full ieee802.11 header.  This is
not the case anymore.  It does not cause problems now, because they
are only dropped during scan.  But when scheduled scans get merged,
this would become a problem because we would drop all small frames
while scheduled scan is running.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 net/mac80211/scan.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 489b6ad..b7a39c4 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -169,9 +169,6 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
 	if (ieee80211_is_ctl(fc))
 		return RX_CONTINUE;
 
-	if (skb->len < 24)
-		return RX_DROP_MONITOR;
-
 	presp = ieee80211_is_probe_resp(fc);
 	if (presp) {
 		/* ignore ProbeResp to foreign address */
-- 
1.7.1


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

* Re: [PATCH] mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx()
  2011-05-09 14:19 [PATCH] mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx() Luciano Coelho
@ 2011-05-09 14:46 ` Johannes Berg
  2011-05-09 16:13   ` Luciano Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-05-09 14:46 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linville, linux-wireless

On Mon, 2011-05-09 at 17:19 +0300, Luciano Coelho wrote:
> This seems to be a leftover from the old days, when we didn't support
> any frames that didn't contain the full ieee802.11 header.  This is
> not the case anymore.  It does not cause problems now, because they
> are only dropped during scan.  But when scheduled scans get merged,
> this would become a problem because we would drop all small frames
> while scheduled scan is running.
> 
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---
>  net/mac80211/scan.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> index 489b6ad..b7a39c4 100644
> --- a/net/mac80211/scan.c
> +++ b/net/mac80211/scan.c
> @@ -169,9 +169,6 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
>  	if (ieee80211_is_ctl(fc))
>  		return RX_CONTINUE;
>  
> -	if (skb->len < 24)
> -		return RX_DROP_MONITOR;
> -

You can't just delete it, we use mgmt->da at least in this code path.
You should just change RX_DROP_MONITOR to RX_CONTINUe here I think.

johannes


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

* Re: [PATCH] mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx()
  2011-05-09 14:46 ` Johannes Berg
@ 2011-05-09 16:13   ` Luciano Coelho
  2011-05-09 16:15     ` [PATCH v2] " Luciano Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Luciano Coelho @ 2011-05-09 16:13 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless

On Mon, 2011-05-09 at 16:46 +0200, Johannes Berg wrote:
> On Mon, 2011-05-09 at 17:19 +0300, Luciano Coelho wrote:
> > This seems to be a leftover from the old days, when we didn't support
> > any frames that didn't contain the full ieee802.11 header.  This is
> > not the case anymore.  It does not cause problems now, because they
> > are only dropped during scan.  But when scheduled scans get merged,
> > this would become a problem because we would drop all small frames
> > while scheduled scan is running.
> > 
> > Cc: Johannes Berg <johannes@sipsolutions.net>
> > Signed-off-by: Luciano Coelho <coelho@ti.com>
> > ---
> >  net/mac80211/scan.c |    3 ---
> >  1 files changed, 0 insertions(+), 3 deletions(-)
> > 
> > diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> > index 489b6ad..b7a39c4 100644
> > --- a/net/mac80211/scan.c
> > +++ b/net/mac80211/scan.c
> > @@ -169,9 +169,6 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
> >  	if (ieee80211_is_ctl(fc))
> >  		return RX_CONTINUE;
> >  
> > -	if (skb->len < 24)
> > -		return RX_DROP_MONITOR;
> > -
> 
> You can't just delete it, we use mgmt->da at least in this code path.
> You should just change RX_DROP_MONITOR to RX_CONTINUe here I think.

Oops! I did this in a hurry and didn't think.  I'm sending v2 in a sec.

-- 
Cheers,
Luca.


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

* [PATCH v2] mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx()
  2011-05-09 16:13   ` Luciano Coelho
@ 2011-05-09 16:15     ` Luciano Coelho
  0 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-05-09 16:15 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes

This seems to be a leftover from the old days, when we didn't support
any frames that didn't contain the full ieee802.11 header.  This is
not the case anymore.  It does not cause problems now, because they
are only dropped during scan.  But when scheduled scans get merged,
this would become a problem because we would drop all small frames
while scheduled scan is running.

To fix this, return RX_CONTINUE instead of RX_DROP_MONITOR.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 net/mac80211/scan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 489b6ad..8acce72 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -170,7 +170,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
 		return RX_CONTINUE;
 
 	if (skb->len < 24)
-		return RX_DROP_MONITOR;
+		return RX_CONTINUE;
 
 	presp = ieee80211_is_probe_resp(fc);
 	if (presp) {
-- 
1.7.1


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

end of thread, other threads:[~2011-05-09 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 14:19 [PATCH] mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx() Luciano Coelho
2011-05-09 14:46 ` Johannes Berg
2011-05-09 16:13   ` Luciano Coelho
2011-05-09 16:15     ` [PATCH v2] " Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox