diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -538,9 +538,17 @@ if (m == NULL) return (ENOBUFS); + /* + * ng_snd_item() will need a vnet context set because we can configure + * connections to nodes that it will send to immediately, rather than + * being enqueued and sent separately. ng_bridge is an obvious example + * of the former case. + */ + CURVNET_SET(priv->node->nd_vnet); NET_EPOCH_ENTER(et); NG_SEND_DATA_ONLY(error, priv->hook, m); NET_EPOCH_EXIT(et); + CURVNET_RESTORE(); return (error); }