]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mac80211: filter locally-originated multicast frames
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 10 Oct 2007 02:46:35 +0000 (22:46 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Nov 2007 16:27:36 +0000 (08:27 -0800)
patch b331615722779b078822988843ddffd4eaec9f83 in mainline.

In STA mode, the AP will echo our traffic.  This includes multicast
traffic.

Receiving these frames confuses some protocols and applications,
notably IPv6 Duplicate Address Detection.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/ieee80211.c

index ff2172ffd8611758ba00efa2abc349892ca11015..2e699d6ebc7d794e1dd2e645ba5479d36ca29e7b 100644 (file)
@@ -2836,9 +2836,10 @@ ieee80211_rx_h_data(struct ieee80211_txrx_data *rx)
                memcpy(dst, hdr->addr1, ETH_ALEN);
                memcpy(src, hdr->addr3, ETH_ALEN);
 
-               if (sdata->type != IEEE80211_IF_TYPE_STA) {
+               if (sdata->type != IEEE80211_IF_TYPE_STA ||
+                   (is_multicast_ether_addr(dst) &&
+                    !compare_ether_addr(src, dev->dev_addr)))
                        return TXRX_DROP;
-               }
                break;
        case 0:
                /* DA SA BSSID */