From 89e366169990f1751f23d594ed3be397b3f78e6a Mon Sep 17 00:00:00 2001 From: dyoung Date: Fri, 21 Jan 2005 22:57:30 +0000 Subject: [PATCH] Bug fix: when encapsulating 802.11 data packets, always copy the BSS node's BSSID into the frame header. It is incorrect to copy in the neighbor's BSSID because it may be out of date following an IBSS merge. --- sys/net80211/ieee80211_output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index b718e4f8a214..a9db73a3cba8 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_output.c,v 1.26 2005/01/16 11:37:58 dyoung Exp $ */ +/* $NetBSD: ieee80211_output.c,v 1.27 2005/01/21 22:57:30 dyoung Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -35,7 +35,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.10 2004/04/02 23:25:39 sam Exp $"); #else -__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.26 2005/01/16 11:37:58 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.27 2005/01/21 22:57:30 dyoung Exp $"); #endif #include "opt_inet.h" @@ -249,7 +249,7 @@ ieee80211_encap(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node **pni) 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); + IEEE80211_ADDR_COPY(wh->i_addr3, ic->ic_bss->ni_bssid); break; case IEEE80211_M_HOSTAP: wh->i_fc[1] = IEEE80211_FC1_DIR_FROMDS;