Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Applied: using 802.11 headers in rx, promiscuous mode fix: msg#00043

Subject: Applied: using 802.11 headers in rx, promiscuous mode fix
Hello!

I have applied a patch that is based on a long discussion by private e-mail (unfortunately - I'd rather see such discussions in the mailing list). The problem is described by John Denker here:
http://www.av8n.com/computer/wifi-lagoon.html

It's a long article, so let me just summarize its main points here:

1) Station to station packets are relayed by the AP. The packet is transmitted twice on the same medium.

2) Some (or even all) firmwares we support would receive both packets when in promiscuous mode.

3) Both packets would look identical once they are decapsulated, so applications would get duplicate packets.

4) Duplicate packets are bad, especially for applications that simply want their data transmitted (as opposed to sniffers).

David Gibson has suggested that the uplink packets (i.e. the packets that the AP is supposed to receive physically) are marked by setting skb->pkt_type to PACKET_OTHERHOST, which would hide them from applications that don't use promiscuous mode.

Since the uplink packets can only be identified by the ToDS flag in the 802.11 headers, it was decided to start using the 802.11 headers for received packets, rather than the compatibility 802.3 headers constructed by the firmware.

The 802.11 header is already used in monitor mode, so the patch unifies some code and allows further unification. I avoided some trivial changes to keep the patch readable.

The patch has been applied to all branches.  Please test.

--
Regards,
Pavel Roskin

Attachment: rx802_11.diff
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>