summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-12-11 03:36:26 +0000
committerarchie <archie@FreeBSD.org>2000-12-11 03:36:26 +0000
commitdb0edd3c391b9475070b42d03b53f9a058882b13 (patch)
tree2c113f7679c1cb22cdf71c6a46d06cc5885b1351 /sys/netgraph
parent25b981f320d2fd06dd8cc9d9fcd9e1fdc2a6d212 (diff)
downloadFreeBSD-src-db0edd3c391b9475070b42d03b53f9a058882b13.zip
FreeBSD-src-db0edd3c391b9475070b42d03b53f9a058882b13.tar.gz
Fix a bug where if the interface was in promiscuous mode when the
last hook was disconnected, the interface would not get reset to non-promiscuous mode. Reported by: jdp
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_ether.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index fcf2f83..775c213 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -697,6 +697,8 @@ ng_ether_disconnect(hook_p hook)
priv->lowerOrphan = 0;
} else
panic("%s: weird hook", __FUNCTION__);
+ if (hook->node->numhooks == 0)
+ ng_rmnode(hook->node); /* reset node */
return (0);
}
OpenPOWER on IntegriCloud