summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2004-04-02 23:09:24 +0000
committersam <sam@FreeBSD.org>2004-04-02 23:09:24 +0000
commita1be64a6dc6d58b5e96a043f83c6a6717aa55604 (patch)
treef5cd897f2571fd2b76018f231d1a0f9fac76aab7 /sys/net80211
parent32d170b4b8c3fb9042c49cc6798b44feecdd140d (diff)
downloadFreeBSD-src-a1be64a6dc6d58b5e96a043f83c6a6717aa55604.zip
FreeBSD-src-a1be64a6dc6d58b5e96a043f83c6a6717aa55604.tar.gz
o change ieee80211_dup_bss to inherit explicit data from ic_bss instead of
blindy copying the node contents; this turns out to be a bad idea as we add more state in the node for things like WPA o track node allocation failures in ieee80211_dup_bss instead of the callers Obtained from: madwifi
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_node.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 65fe2a3..59bac26 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -480,9 +480,14 @@ ieee80211_dup_bss(struct ieee80211com *ic, u_int8_t *macaddr)
{
struct ieee80211_node *ni = (*ic->ic_node_alloc)(ic);
if (ni != NULL) {
- memcpy(ni, ic->ic_bss, sizeof(struct ieee80211_node));
ieee80211_setup_node(ic, ni, macaddr);
- }
+ /*
+ * Inherit from ic_bss.
+ */
+ IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_bss->ni_bssid);
+ ni->ni_chan = ic->ic_bss->ni_chan;
+ } else
+ ic->ic_stats.is_rx_nodealloc++;
return ni;
}
OpenPOWER on IntegriCloud