return rtmax bytes if we get READ requests larger than rtmax.
This commit is contained in:
parent
8cc1df8614
commit
d16c4c058f
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: nfs_serv.c,v 1.70 2003/04/02 15:14:20 yamt Exp $ */
|
/* $NetBSD: nfs_serv.c,v 1.71 2003/04/03 15:19:12 yamt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1989, 1993
|
* Copyright (c) 1989, 1993
|
||||||
@ -59,7 +59,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.70 2003/04/02 15:14:20 yamt Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.71 2003/04/03 15:19:12 yamt Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -610,7 +610,9 @@ nfsrv_read(nfsd, slp, procp, mrq)
|
|||||||
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED);
|
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED);
|
||||||
off = (off_t)fxdr_unsigned(u_int32_t, *tl);
|
off = (off_t)fxdr_unsigned(u_int32_t, *tl);
|
||||||
}
|
}
|
||||||
nfsm_srvstrsiz(reqlen, NFS_SRVMAXDATA(nfsd));
|
nfsm_dissect(tl, uint32_t *, NFSX_UNSIGNED);
|
||||||
|
reqlen = fxdr_unsigned(uint32_t, *tl);
|
||||||
|
reqlen = MIN(reqlen, NFS_SRVMAXDATA(nfsd));
|
||||||
error = nfsrv_fhtovp(fhp, 1, &vp, cred, slp, nam,
|
error = nfsrv_fhtovp(fhp, 1, &vp, cred, slp, nam,
|
||||||
&rdonly, (nfsd->nd_flag & ND_KERBAUTH), FALSE);
|
&rdonly, (nfsd->nd_flag & ND_KERBAUTH), FALSE);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user