From b4e9f8379e8158fc7262cb86f9bd853f7836a8aa Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 22 Jul 2004 22:50:15 +0000 Subject: Actually free the unit when destroying the interface. Reported by: la at delfi.lt Tested by: la at delfi.lt PR: 68618 --- sys/net/if_vlan.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys') diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 4f6e0bd98585d..55eb541d4f5ff 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); } -- cgit v1.3