diff options
author | brooks <brooks@FreeBSD.org> | 2004-07-22 22:50:15 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2004-07-22 22:50:15 +0000 |
commit | 69e2cf0e4d2da4a251e206596c0e8d88bf4790f7 (patch) | |
tree | dac75c6710ae34c0b959d61d2321fe2aecf0b276 /sys | |
parent | 5a3e9fbaf3e88198110334f2b0bb1bd9d94742c6 (diff) | |
download | FreeBSD-src-69e2cf0e4d2da4a251e206596c0e8d88bf4790f7.zip FreeBSD-src-69e2cf0e4d2da4a251e206596c0e8d88bf4790f7.tar.gz |
Actually free the unit when destroying the interface.
Reported by: la at delfi.lt
Tested by: la at delfi.lt
PR: 68618
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_vlan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 4f6e0bd..55eb541 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -421,8 +421,11 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len) static int vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) { + int unit; struct ifvlan *ifv = ifp->if_softc; + unit = ifp->if_dunit; + VLAN_LOCK(); LIST_REMOVE(ifv, ifv_list); vlan_unconfig(ifp); @@ -432,6 +435,8 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) free(ifv, M_VLAN); + ifc_free_unit(ifc, unit); + return (0); } |