From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760583AbXJaP1W (ORCPT ); Wed, 31 Oct 2007 11:27:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759917AbXJaPYh (ORCPT ); Wed, 31 Oct 2007 11:24:37 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:33488 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759911AbXJaPYg (ORCPT ); Wed, 31 Oct 2007 11:24:36 -0400 Date: Wed, 31 Oct 2007 08:11:44 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, "John W. Linville" , Johannes Berg , Michael Wu , "David S. Miller" Subject: [patch 13/26] mac80211: filter locally-originated multicast frames Message-ID: <20071031151144.GN2437@kroah.com> References: <20071031150535.967437651@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="mac80211-filter-locally-originated-multicast-frames.patch" In-Reply-To: <20071031151015.GA2437@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 2.6.22-stable review patch. If anyone has any objections, please let us know. ------------------ From: John W. Linville 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 Signed-off-by: Johannes Berg Acked-by: Michael Wu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/mac80211/ieee80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c @@ -2615,9 +2615,10 @@ ieee80211_rx_h_data(struct ieee80211_txr 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 */ --