From a8b16e872733333b806ca791388514fa7a6d0c92 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Sat, 22 Jan 2005 20:33:37 +0000 Subject: [PATCH] handle potential stale values of bssid in neighbor nodes that can occur after an ibss merge Submitted by: David Young --- sys/net80211/ieee80211_output.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index bb8af1726c37..bb20201bf32b 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -519,7 +519,11 @@ ieee80211_encap(struct ieee80211com *ic, struct mbuf *m, wh->i_fc[1] = IEEE80211_FC1_DIR_NODS; IEEE80211_ADDR_COPY(wh->i_addr1, eh.ether_dhost); IEEE80211_ADDR_COPY(wh->i_addr2, eh.ether_shost); - IEEE80211_ADDR_COPY(wh->i_addr3, ni->ni_bssid); + /* + * NB: always use the bssid from ic_bss as the + * neighbor's may be stale after an ibss merge + */ + IEEE80211_ADDR_COPY(wh->i_addr3, ic->ic_bss->ni_bssid); break; case IEEE80211_M_HOSTAP: wh->i_fc[1] = IEEE80211_FC1_DIR_FROMDS;