]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[MAC80211]: filter locally-originated multicast frames
authorJohn W. Linville <linville@tuxdriver.com>
Tue, 28 Aug 2007 21:01:55 +0000 (17:01 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:48:56 +0000 (16:48 -0700)
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: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mac80211/rx.c

index e2c6f5cd1cf747678b4128b170078d7b1a96ad50..969be3adda7a1f14f63a1cb2ef4c1c2605ceeb30 100644 (file)
@@ -988,9 +988,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 */