Set NG_INVALID flag when destroying node.

This commit is contained in:
Archie Cobbs 2000-07-14 22:35:13 +00:00
parent 6bd19f4257
commit 840e97785b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63195

View file

@ -287,6 +287,7 @@ ng_ether_detach(struct ifnet *ifp)
if (node == NULL) /* no node (why not?), ignore */
return;
ng_rmnode(node); /* break all links to other nodes */
node->flags |= NG_INVALID;
IFP2NG(ifp) = NULL; /* detach node from interface */
priv = node->private; /* free node private info */
bzero(priv, sizeof(*priv));