All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jochen Friedrich <jochen@scram.de>
To: linux-wireless@vger.kernel.org
Subject: 4addr mode promisc problem
Date: Sun, 15 Aug 2010 18:52:35 +0200	[thread overview]
Message-ID: <4C681B53.9080100@scram.de> (raw)

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

                 reply	other threads:[~2010-08-15 17:11 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=4C681B53.9080100@scram.de \
    --to=jochen@scram.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.