mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
nlm: set vnet(9) context in the NLM syscall
With the kernel RPC binding moving to Netlink transport all clients need to have proper vnet(9) context set. This change will unlikely make NLM properly virtualized, but at least it will not panic on the default VNET when kernel is compiled with VIMAGE. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D48555
This commit is contained in:
parent
030c028255
commit
59f9d8c4bf
1 changed files with 6 additions and 1 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include <sys/mount.h>
|
||||
#include <sys/priv.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/jail.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/syscall.h>
|
||||
|
|
@ -1711,7 +1712,11 @@ sys_nlm_syscall(struct thread *td, struct nlm_syscall_args *uap)
|
|||
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);
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
|
|
|||
Loading…
Reference in a new issue