Always record a change of the BSS node's BSSID, even if a desired
BSSID is set. In IBSS mode, if the BSS node's BSSID changes, and a desired BSSID is *not* set, make a RUN->RUN transition to give the driver an opportunity to reprogram its BSSID filter. This fixes a bug where both wlanctl(8) and ifconfig(8) indicated that an interface had joined a new BSS, but no packets would get through, except in promiscuous mode, because the hardware still filtered packets based on the old BSSID.
This commit is contained in:
parent
da04ad7825
commit
8e41de9845
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ieee80211_input.c,v 1.51 2005/11/23 04:32:12 dyoung Exp $ */
|
||||
/* $NetBSD: ieee80211_input.c,v 1.52 2005/12/08 20:19:49 dyoung Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2001 Atsushi Onoe
|
||||
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
|
||||
@ -36,7 +36,7 @@
|
||||
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.51 2005/11/23 04:32:12 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.52 2005/12/08 20:19:49 dyoung Exp $");
|
||||
#endif
|
||||
|
||||
#include "opt_inet.h"
|
||||
@ -2045,18 +2045,24 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
|
||||
} else if (ni == ic->ic_bss &&
|
||||
!IEEE80211_ADDR_EQ(wh->i_addr3,
|
||||
ni->ni_bssid)) {
|
||||
/* Mark a change of BSSID. If
|
||||
* ic_des_bssid is set, ni does
|
||||
* not now represent a network we
|
||||
* want to belong to, so start a
|
||||
* scan.
|
||||
/* Mark a change of BSSID. If
|
||||
* ic_des_bssid is set, ni does
|
||||
* not now represent a network we
|
||||
* want to belong to, so start a
|
||||
* scan. Otherwise, make a RUN->RUN
|
||||
* transition to give the driver
|
||||
* an opportunity to reprogram its
|
||||
* BSSID filter.
|
||||
*/
|
||||
IEEE80211_ADDR_COPY(ni->ni_bssid, wh->i_addr3);
|
||||
if (ic->ic_flags & IEEE80211_F_DESBSSID) {
|
||||
ieee80211_new_state(ic,
|
||||
IEEE80211_S_SCAN, 0);
|
||||
return;
|
||||
} else {
|
||||
ieee80211_new_state(ic,
|
||||
IEEE80211_S_RUN, 0);
|
||||
}
|
||||
IEEE80211_ADDR_COPY(ni->ni_bssid, wh->i_addr3);
|
||||
} else {
|
||||
/*
|
||||
* Record tsf for potential resync.
|
||||
|
Loading…
Reference in New Issue
Block a user