Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2007 00:25:24 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 114941 for review
Message-ID:  <200702240025.l1O0POgb043921@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114941

Change 114941 by sam@sam_ebb on 2007/02/24 00:24:41

	discard deauth and disassoc frames that aren't from the
	ap we're associated to; these can be received, for example,
	if the interface is in promiscuous mode

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_input.c#92 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#92 (text+ko) ====

@@ -2861,6 +2861,11 @@
 		ic->ic_stats.is_rx_deauth++;
 		IEEE80211_NODE_STAT(ni, rx_deauth);
 
+		if (!IEEE80211_ADDR_EQ(wh->i_addr1, ic->ic_myaddr)) {
+			/* NB: can happen when in promiscuous mode */
+			ic->ic_stats.is_rx_mgtdiscard++;
+			break;
+		}
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_AUTH,
 		    "[%s] recv deauthenticate (reason %d)\n",
 		    ether_sprintf(ni->ni_macaddr), reason);
@@ -2898,6 +2903,11 @@
 		ic->ic_stats.is_rx_disassoc++;
 		IEEE80211_NODE_STAT(ni, rx_disassoc);
 
+		if (!IEEE80211_ADDR_EQ(wh->i_addr1, ic->ic_myaddr)) {
+			/* NB: can happen when in promiscuous mode */
+			ic->ic_stats.is_rx_mgtdiscard++;
+			break;
+		}
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC,
 		    "[%s] recv disassociate (reason %d)\n",
 		    ether_sprintf(ni->ni_macaddr), reason);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702240025.l1O0POgb043921>