mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
c64bfa0f8f
commit
694dca643b
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue