PERFORCE change 114941 for review

Sam Leffler sam at FreeBSD.org
Sat Feb 24 00:25:25 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=114941

Change 114941 by sam at 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);


More information about the p4-projects mailing list