summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorcel <cel@FreeBSD.org>2006-03-08 01:43:01 +0000
committercel <cel@FreeBSD.org>2006-03-08 01:43:01 +0000
commit85c8b06cbe7efe55ca9d6a18d623fa181f29b4b3 (patch)
treef7f412d6230989b22378d95918e715aa6be90d92 /sys/nfsclient
parent7d4fc1e0d475c302273e3401767bdee27f72041b (diff)
downloadFreeBSD-src-85c8b06cbe7efe55ca9d6a18d623fa181f29b4b3.zip
FreeBSD-src-85c8b06cbe7efe55ca9d6a18d623fa181f29b4b3.tar.gz
Fix a bug in NFSv3 READDIRPLUS reply processing
The client's READDIRPLUS logic skips the attributes and filehandle of the ".." entry. If the server doesn't send attributes but does send a filehandle for "..", the client's logic doesn't account for the extra "value follows" field that indicates whether the filehandle is present, causing the remaining entries in the reply to be ignored. Sponsored by: Network Appliance, Inc. Reviewed by: rick, mohans Approved by: silby MFC after: 2 weeks
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 445030d..7028836 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2312,7 +2312,11 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
/* Just skip over the file handle */
tl = nfsm_dissect(u_int32_t *, NFSX_UNSIGNED);
i = fxdr_unsigned(int, *tl);
- nfsm_adv(nfsm_rndup(i));
+ if (i) {
+ tl = nfsm_dissect(u_int32_t *, NFSX_UNSIGNED);
+ fhsize = fxdr_unsigned(int, *tl);
+ nfsm_adv(nfsm_rndup(fhsize));
+ }
}
if (newvp != NULLVP) {
if (newvp == vp)
OpenPOWER on IntegriCloud