Add a safety belt assignment to the nfsd for when "-p" isn't specified.
The kernel code assumes that nfsdargs.addr == NULL and nfsdargs.addrlen == 0 when there is no "-p" argument used for starting the nfsd. This small patch ensures this is the case. In practice, I believe this always happened, since "nfsdargs" was the last element on the stack for "main()", but this little patch ensures it will be the case. Spotted by inspection while adding a new optional field for "-p".
This commit is contained in:
parent
fbfca78ed2
commit
2f800e5593
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335814
@ -180,6 +180,8 @@ main(int argc, char **argv)
|
||||
struct nfsd_nfsd_args nfsdargs;
|
||||
|
||||
nfsdargs.mirrorcnt = 1;
|
||||
nfsdargs.addr = NULL;
|
||||
nfsdargs.addrlen = 0;
|
||||
nfsdcnt = DEFNFSDCNT;
|
||||
unregister = reregister = tcpflag = maxsock = 0;
|
||||
bindanyflag = udpflag = connect_type_cnt = bindhostc = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user