summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2004-01-09 00:41:45 +0000
committergreen <green@FreeBSD.org>2004-01-09 00:41:45 +0000
commitae72c2e86b33381de1c1f3ce4cb9301e88c0a5f8 (patch)
tree83296879436ee555bf1c6c7d760ea98675c10f22 /sys
parente73ac85912aa7bf1a141b56b00f9a99a50d2eec1 (diff)
downloadFreeBSD-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.c8
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);
OpenPOWER on IntegriCloud