diff options
Diffstat (limited to 'sys/netgraph/ng_ether.c')
-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); |