aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph
diff options
context:
space:
mode:
authorMarko Zec <zec@FreeBSD.org>2011-07-16 19:11:45 +0000
committerMarko Zec <zec@FreeBSD.org>2011-07-16 19:11:45 +0000
commit2cdf8c49a6997159bfa9f15873a6a58cd22f20c2 (patch)
treeb97e06165173e37e39e42232c04b25fea4083308 /sys/netgraph
parentf683b68e5a85752850ff5cd6cb82fcb78bb21295 (diff)
downloadsrc-2cdf8c49a6997159bfa9f15873a6a58cd22f20c2.tar.gz
src-2cdf8c49a6997159bfa9f15873a6a58cd22f20c2.zip
Clear pending ifnet events, in an attempt at preventing
ng_ether_link_state() from being dispatched after we have cleared our IFP2NG(ifp). MFC after: 3 days
Notes
Notes: svn path=/head/; revision=224107
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 b51d04825e9a..afedaa37a8f7 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -55,6 +55,7 @@
#include <sys/proc.h>
#include <sys/syslog.h>
#include <sys/socket.h>
+#include <sys/taskqueue.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -336,6 +337,7 @@ ng_ether_detach(struct ifnet *ifp)
const node_p node = IFP2NG(ifp);
const priv_p priv = NG_NODE_PRIVATE(node);
+ taskqueue_drain(taskqueue_swi, &ifp->if_linktask);
NG_NODE_REALLY_DIE(node); /* Force real removal of node */
/*
* We can't assume the ifnet is still around when we run shutdown