From: Johannes Berg <johannes@sipsolutions.net>
To: Eliad Peller <eliad@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 3/3] mac80211: redesign scan RX
Date: Sun, 08 Jul 2012 11:28:12 +0200 [thread overview]
Message-ID: <1341739692.4987.1.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAB3XZEdmBi4gb=HMnwXRq4wygoQ6Gi=eTkocTA_NGNZLusWj_Q@mail.gmail.com> (sfid-20120708_003910_137592_0919E0B2)
On Sun, 2012-07-08 at 01:39 +0300, Eliad Peller wrote:
> > + sdata1 = rcu_dereference(local->scan_sdata);
> > + sdata2 = rcu_dereference(local->sched_scan_sdata);
> >
> > - if (skb->len < 24)
> > - return RX_CONTINUE;
> > + if (likely(!sdata1 && !sdata2))
> > + return;
> >
> > - presp = ieee80211_is_probe_resp(fc);
> > - if (presp) {
> > + if (ieee80211_is_probe_resp(mgmt->frame_control)) {
> > /* ignore ProbeResp to foreign address */
> > - if (!ether_addr_equal(mgmt->da, sdata->vif.addr))
> > - return RX_DROP_MONITOR;
> > + if (!ether_addr_equal(mgmt->da, sdata1->vif.addr) &&
> > + !ether_addr_equal(mgmt->da, sdata2->vif.addr))
> > + return;
>
> you should check sdata1 and sdata2 before dereferencing them.
Yes, good catch, thanks. It seems I should've crashed it in testing,
I'll make sure I tested the right code ... unless, I think our device
may be filtering probe responses to foreign addresses, and we don't have
sched scan. Yeah, that might do it.
Anyway, I'll fix it.
johannes
next prev parent reply other threads:[~2012-07-08 9:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 21:05 [RFC 0/3] mac80211 scanning restructuring Johannes Berg
2012-07-06 21:05 ` [RFC 1/3] mac80211: make scan_sdata pointer usable with RCU Johannes Berg
2012-07-08 16:27 ` Arik Nemtsov
2012-07-09 7:59 ` Johannes Berg
2012-07-09 8:48 ` Arik Nemtsov
2012-07-09 9:10 ` Johannes Berg
2012-07-09 9:15 ` Arik Nemtsov
2012-07-09 9:23 ` Johannes Berg
2012-07-09 9:39 ` Arik Nemtsov
2012-07-09 9:43 ` Johannes Berg
2012-07-09 9:53 ` Arik Nemtsov
2012-07-06 21:05 ` [RFC 2/3] mac80211: track scheduled scan virtual interface Johannes Berg
2012-07-06 21:05 ` [RFC 3/3] mac80211: redesign scan RX Johannes Berg
2012-07-07 22:39 ` Eliad Peller
2012-07-08 9:28 ` Johannes Berg [this message]
2012-07-06 21:30 ` [RFC 0/3] mac80211 scanning restructuring Ben Greear
2012-07-06 21:35 ` Johannes Berg
2012-07-06 21:45 ` Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341739692.4987.1.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=eliad@wizery.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).