]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mac80211: as a 4-addr station, do not receive packets for other stations
authorFelix Fietkau <nbd@openwrt.org>
Sat, 5 Feb 2011 22:48:37 +0000 (23:48 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Feb 2011 21:18:27 +0000 (16:18 -0500)
Since 4-addr frames completely override the source address which will
make it into the converted 802.3 frames, receiving frames for other
4-addr stations will confuse the bridging code.

To be able to handle traffic for all connected devices, the bridge
code will automatically turn on promiscuous mode, which triggers
this problem.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Steve Brown <sbrown@cortland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rx.c

index b5f59ed240004720b6ede13e1654dbdaa2b2c5b2..50c2c881249d7ea051a1f222a69461781b7f69c6 100644 (file)
@@ -2646,7 +2646,8 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
                        return 0;
                if (!multicast &&
                    compare_ether_addr(sdata->vif.addr, hdr->addr1) != 0) {
-                       if (!(sdata->dev->flags & IFF_PROMISC))
+                       if (!(sdata->dev->flags & IFF_PROMISC) ||
+                           sdata->u.mgd.use_4addr)
                                return 0;
                        status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
                }