freebsd11_wlan: Drain ageq before cleaning it up.
The comment above ieee80211_ageq_cleanup specifically notes that the queue is assumed to be empty, and in order to make it so, ieee80211_ageq_drain must be used. Possibly helps with #3180, as this might be a source of mbuf leakage.
This commit is contained in:
parent
8959d55643
commit
dffc3e2353
@ -30,13 +30,13 @@ __FBSDID("$FreeBSD: releng/11.1/sys/net80211/ieee80211_node.c 302018 2016-06-19
|
||||
#include "opt_wlan.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kernel.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_var.h>
|
||||
#include <net/if_media.h>
|
||||
@ -134,6 +134,9 @@ ieee80211_node_detach(struct ieee80211com *ic)
|
||||
|
||||
callout_drain(&ic->ic_inact);
|
||||
ieee80211_node_table_cleanup(&ic->ic_sta);
|
||||
#ifdef __HAIKU__
|
||||
ieee80211_ageq_drain(&ic->ic_stageq);
|
||||
#endif
|
||||
ieee80211_ageq_cleanup(&ic->ic_stageq);
|
||||
}
|
||||
|
||||
@ -199,7 +202,7 @@ ieee80211_node_vdetach(struct ieee80211vap *vap)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Port authorize/unauthorize interfaces for use by an authenticator.
|
||||
*/
|
||||
|
||||
@ -370,7 +373,7 @@ ieee80211_create_ibss(struct ieee80211vap* vap, struct ieee80211_channel *chan)
|
||||
memcpy(ni->ni_meshid, vap->iv_mesh->ms_id, ni->ni_meshidlen);
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
/*
|
||||
* Fix the channel and related attributes.
|
||||
*/
|
||||
/* clear DFS CAC state on previous channel */
|
||||
@ -550,7 +553,7 @@ check_bss_debug(struct ieee80211vap *vap, struct ieee80211_node *ni)
|
||||
printf("%s\n", fail & 0x10 ? "!" : "");
|
||||
}
|
||||
#endif /* IEEE80211_DEBUG */
|
||||
|
||||
|
||||
|
||||
int
|
||||
ieee80211_ibss_merge_check(struct ieee80211_node *ni)
|
||||
@ -755,7 +758,7 @@ ieee80211_sta_join1(struct ieee80211_node *selbs)
|
||||
* Set the erp state (mostly the slot time) to deal with
|
||||
* the auto-select case; this should be redundant if the
|
||||
* mode is locked.
|
||||
*/
|
||||
*/
|
||||
ieee80211_reset_erp(ic);
|
||||
ieee80211_wme_initparams(vap);
|
||||
|
||||
@ -1461,7 +1464,7 @@ ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap,
|
||||
/*
|
||||
* In adhoc demo mode there are no management
|
||||
* frames to use to discover neighbor capabilities,
|
||||
* so blindly propagate the local configuration
|
||||
* so blindly propagate the local configuration
|
||||
* so we can do interesting things (e.g. use
|
||||
* WME to disable ACK's).
|
||||
*/
|
||||
@ -2043,7 +2046,7 @@ timeout_stations(void *arg __unused, struct ieee80211_node *ni)
|
||||
/* XXX before inact decrement? */
|
||||
if (ni == vap->iv_bss)
|
||||
return;
|
||||
if (ni->ni_associd != 0 ||
|
||||
if (ni->ni_associd != 0 ||
|
||||
(vap->iv_opmode == IEEE80211_M_IBSS ||
|
||||
vap->iv_opmode == IEEE80211_M_AHDEMO)) {
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user