linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 4addr mode promisc problem
@ 2010-08-15 16:52 Jochen Friedrich
  0 siblings, 0 replies; only message in thread
From: Jochen Friedrich @ 2010-08-15 16:52 UTC (permalink / raw)
  To: linux-wireless

Hi,

in the current implementation of mac80211 4addr mode, bridging a 
wireless interface to a wired one doesn't work as expected due to 
promisc mode forwarding frames sent to a different "AP" to higher 
layers...

Given this setup:

A -wireless link- AP -4addr mode link- B -ethernet- C

If I now ping C from A (all ARP entries are already set up), I get 
exactly one response back.

This is what's happening:

A sends echo request to AP:
Frame Addr1=AP, Addr2=A, Addr3=C
AP adds CAM entry A=wlan0
B adds CAM entry A=wlan0.sta1

AP sends echo request to B
Frame Addr1=B, Addr2=AP, Addr3=C, Addr4=A

B doesn't have CAM entry for C, forwards echo request to eth0.

C replies with echo reply on eth0.
B adds CAM entry C=eth0

B hat CAM entry of A, sends echo reply to wlan0.sta1
Frame Addr1=AP, Addr2=B, Addr3=A, Addr4=C

AP sends echo reply to A
Frame Addr1=A, Addr2=AP, Addr3=C
B updates CAM entry C=wlan0.sta1

Here the problem happens. B receives the frame from AP to A. It 
can't decrypt the frame but it still updates the CAM entry and any 
future packet from A to C won't be forwarded to eth0 anymore.

IMHO, promisc mode on an interface with 4addr mode should only 
affect addr3 processing, but not addr1. The current behaviour looks 
like a bug to me.

Config on B (needs iw patch sent by me two weeks ago):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet manual
     pre-up iw wlan0 set 4addr on

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
     bridge_ports wlan0 eth0
     bridge_fd 0
     bridge_stp off
     wpa-ssid <my ssid>
     wpa-psk  <my password>
     wpa-bridge br0
     wpa-iface  wlan0

Thanks,
Jochen

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-15 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-15 16:52 4addr mode promisc problem Jochen Friedrich

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