diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c --- a/sys/nlm/nlm_prot_impl.c +++ b/sys/nlm/nlm_prot_impl.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1711,7 +1712,11 @@ nlm_grace_threshold = time_uptime + uap->grace_period; nlm_next_idle_check = time_uptime + NLM_IDLE_PERIOD; - return nlm_server_main(uap->addr_count, uap->addrs); + CURVNET_SET(TD_TO_VNET(td)); + error = nlm_server_main(uap->addr_count, uap->addrs); + CURVNET_RESTORE(); + + return (error); } /**********************************************************************/