Remove node's name reference when the interface is detached;

otherwise, the ng_ether.ko KLD will never be unloadable after
all Ethernet interfaces are detached, as it should be, because
of the lingering extra reference.

Submitted by:	"Yevmenkin, Maksim N, CSCIO" <myevmenkin@att.com>
This commit is contained in:
Archie Cobbs 2000-07-19 17:33:53 +00:00
parent abc3361a8b
commit 7c24617ca0

@ -288,6 +288,7 @@ ng_ether_detach(struct ifnet *ifp)
return;
ng_rmnode(node); /* break all links to other nodes */
node->flags |= NG_INVALID;
ng_unname(node); /* free name (and its reference) */
IFP2NG(ifp) = NULL; /* detach node from interface */
priv = node->private; /* free node private info */
bzero(priv, sizeof(*priv));