From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: Jouni Malinen <j@w1.fi>, Michael Wu <flamingice@sourmilk.net>,
Jiri Benc <jbenc@suse.cz>
Subject: promisc interface behaviour, matching frames to interfaces
Date: Fri, 21 Sep 2007 17:18:00 +0200 [thread overview]
Message-ID: <1190387880.18521.150.camel@johannes.berg> (raw)
[-- Attachment #1: Type: text/plain, Size: 2773 bytes --]
Hey,
Thinking more about how to match frames to interfaces, I'm a bit worried
about promisc behaviour.
Currently, we have code for one dubious optimisation: if the sender is
known, not a WDS peer or an AP we're associated to, the frame is not
multicast and we don't have promisc interfaces, we push the frame to the
interface the sender is associated to assuming that we're actually the
right destination. I believe that last part is simply wrong, shouldn't
we at least check the RA?
In any case, I think that it's also not as good as it could be. It only
seems to catch STAs that are associated to us as an AP, but then why
the !promisc check?
However, when thinking about how to improve (see also my previous mail),
I noticed that there's no clear definition of how promisc should work.
In the STA/IBSS case it's not too bad: see frames from the same BSS but
not necessarily addressed to us. But what about an AP/VLAN interface? Or
WDS? I tend to think that for those, promisc makes no sense at all,
which is sort of what is implemented today. Anybody have a differing
opinion?
Once we have that sorted out, let's take a step back and see what sort
of frames we can get, here's a table:
ToDS FromDS A1(RA) A2(TA) A3 A4 Use
---------------------------------------------------
0 0 DA SA BSSID - IBSS and DLS
0 1 DA BSSID SA - AP -> STA
1 0 BSSID SA DA - AP <- STA
1 1 RA TA DA SA unspecified (WDS)
Now, the easiest way to do good matching from frames to interfaces seems
to look like this:
First handle the IBSS interface (if present) [1] by checking whether the
frame is an IBSS frame destined to us with the right BSSID and adding
the transmitter to the station table.
Secondly, iterate over all [2] known sta_info structures with matching
TA. The device they belong to is most likely the right device, but you
need to consider the DS bits.
Except for the scanning problem mentioned earlier which I believe I can
fix with some cleanups, this still has the problem that promisc stops
working.
I suppose the real question is: is promisc really useful on an 802.3
framed interface? Personally, I always use monitor interfaces and then
also get to see the right frames if it wasn't encrypted (or WEP,
wireshark can decrypt WEP.)
johannes
[1] we can really only allow one IBSS interface on a single hardware
because they could try to be in the same BSS and that leads to trouble
[2] technically, this requires my patch to make sta_info structures
per-interface, but unless you need corner cases it works fine right now
as well, only you iterate over a single one
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
reply other threads:[~2007-09-21 15:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1190387880.18521.150.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=flamingice@sourmilk.net \
--cc=j@w1.fi \
--cc=jbenc@suse.cz \
--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