netgraph(4) callouts need to be executed in the network epoch.

This commit is contained in:
Gleb Smirnoff 2020-02-05 02:53:40 +00:00
parent 56cc8b7595
commit 4c02c20c32
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357557

View file

@ -3772,11 +3772,14 @@ ng_send_fn2(node_p node, hook_p hook, item_p pitem, ng_item_fn2 *fn, void *arg1,
static void
ng_callout_trampoline(void *arg)
{
struct epoch_tracker et;
item_p item = arg;
NET_EPOCH_ENTER(et);
CURVNET_SET(NGI_NODE(item)->nd_vnet);
ng_snd_item(item, 0);
CURVNET_RESTORE();
NET_EPOCH_EXIT(et);
}
int