diff options
author | green <green@FreeBSD.org> | 2004-01-09 00:41:45 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2004-01-09 00:41:45 +0000 |
commit | ae72c2e86b33381de1c1f3ce4cb9301e88c0a5f8 (patch) | |
tree | 83296879436ee555bf1c6c7d760ea98675c10f22 /sys | |
parent | e73ac85912aa7bf1a141b56b00f9a99a50d2eec1 (diff) | |
download | FreeBSD-src-ae72c2e86b33381de1c1f3ce4cb9301e88c0a5f8.zip FreeBSD-src-ae72c2e86b33381de1c1f3ce4cb9301e88c0a5f8.tar.gz |
Don't try to ifpromisc() on an interface that's deleted already.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netgraph/ng_ether.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index b1756d0..b741b07 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -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); |