mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
nfscl: Fix NFSv4.1/4.2 Lookup+Open RPC
Use of the Lookup+Open RPC is currently disabled, due to a problem detected during testing. This patch fixes this problem. The problem was that nfscl_postop_attr() does not parse the attributes if nd_repstat != 0. It also would parse the return status for the operation, where the Lookup+Open code had already parsed it. The first change in the patch does not make any semantics change, but makes the code identical to what is done later in the function, so that it is apparent that the semantics should be the same in both places. Lookup+Open remains disabled while further testing is being done, so this patch has no effect at this time.
This commit is contained in:
parent
19a6267d61
commit
57014f21e7
1 changed files with 10 additions and 6 deletions
|
|
@ -1499,10 +1499,9 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred,
|
|||
ND_NFSV4) {
|
||||
/* Load the directory attributes. */
|
||||
error = nfsm_loadattr(nd, dnap);
|
||||
if (error == 0)
|
||||
*dattrflagp = 1;
|
||||
else
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
*dattrflagp = 1;
|
||||
}
|
||||
/* Check Lookup operation reply status. */
|
||||
if (openmode != 0 && (nd->nd_flag & ND_NOMOREDATA) == 0) {
|
||||
|
|
@ -1524,10 +1523,15 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred,
|
|||
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED);
|
||||
if (*++tl != 0)
|
||||
goto nfsmout;
|
||||
error = nfscl_postop_attr(nd, nap, attrflagp, stuff);
|
||||
if (error == 0)
|
||||
/* Successfully got Lookup done. */
|
||||
error = nfsm_loadattr(nd, nap);
|
||||
if (error == 0) {
|
||||
/*
|
||||
* We have now successfully completed the
|
||||
* lookup, so set nd_repstat to 0.
|
||||
*/
|
||||
nd->nd_repstat = 0;
|
||||
*attrflagp = 1;
|
||||
}
|
||||
}
|
||||
goto nfsmout;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue