discard deauth+disassoc frames that are not destined for us; these

can be received when the interface is in promisc mode

Reviewed by:	sephe
Obtained from:	netbsd
This commit is contained in:
Sam Leffler 2007-03-11 06:35:27 +00:00
parent 11df4239a6
commit b265ac32c2

View File

@ -2559,6 +2559,11 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
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);
@ -2596,6 +2601,11 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
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);