diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index b51d04825e9..afedaa37a8f 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -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