mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Don't try to ifpromisc() on an interface that's deleted already.
This commit is contained in:
parent
07eacae0d2
commit
018df1c369
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124269
@ -597,10 +597,6 @@ ng_ether_shutdown(node_p node)
|
||||
{
|
||||
const priv_p priv = NG_NODE_PRIVATE(node);
|
||||
|
||||
if (priv->promisc) { /* disable promiscuous mode */
|
||||
(void)ifpromisc(priv->ifp, 0);
|
||||
priv->promisc = 0;
|
||||
}
|
||||
if (node->nd_flags & NG_REALLY_DIE) {
|
||||
/*
|
||||
* WE came here because the ethernet card is being unloaded,
|
||||
@ -613,6 +609,10 @@ ng_ether_shutdown(node_p node)
|
||||
NG_NODE_UNREF(node); /* free node itself */
|
||||
return (0);
|
||||
}
|
||||
if (priv->promisc) { /* disable promiscuous mode */
|
||||
(void)ifpromisc(priv->ifp, 0);
|
||||
priv->promisc = 0;
|
||||
}
|
||||
priv->autoSrcAddr = 1; /* reset auto-src-addr flag */
|
||||
node->nd_flags &= ~NG_INVALID; /* Signal ng_rmnode we are persisant */
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user