Fix clone destruction, can't use the simple api because that does not remove
the ifnet from cloner's list. Expose if_clone_destroyif api to do this. Submitted by: sam
This commit is contained in:
parent
b0000a98c4
commit
cb959fa205
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183210
@ -53,7 +53,6 @@
|
||||
static void if_clone_free(struct if_clone *ifc);
|
||||
static int if_clone_createif(struct if_clone *ifc, char *name, size_t len,
|
||||
caddr_t params);
|
||||
static int if_clone_destroyif(struct if_clone *ifc, struct ifnet *ifp);
|
||||
|
||||
static struct mtx if_cloners_mtx;
|
||||
static int if_cloners_count;
|
||||
@ -199,7 +198,7 @@ if_clone_destroy(const char *name)
|
||||
/*
|
||||
* Destroy a clone network interface.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
if_clone_destroyif(struct if_clone *ifc, struct ifnet *ifp)
|
||||
{
|
||||
int err;
|
||||
|
@ -75,6 +75,7 @@ void if_clone_detach(struct if_clone *);
|
||||
|
||||
int if_clone_create(char *, size_t, caddr_t);
|
||||
int if_clone_destroy(const char *);
|
||||
int if_clone_destroyif(struct if_clone *, struct ifnet *);
|
||||
int if_clone_list(struct if_clonereq *);
|
||||
|
||||
int ifc_name2unit(const char *name, int *unit);
|
||||
|
@ -144,7 +144,7 @@ IFC_SIMPLE_DECLARE(wlan, 0);
|
||||
void
|
||||
ieee80211_vap_destroy(struct ieee80211vap *vap)
|
||||
{
|
||||
ifc_simple_destroy(&wlan_cloner, vap->iv_ifp);
|
||||
if_clone_destroyif(&wlan_cloner, vap->iv_ifp);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user