From 21732dea0c4943518e727150906d9117775a8a6b Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 5 Jun 1999 05:35:03 +0000 Subject: Various changes lifted from the OpenBSD cvs tree: txdr_hyper and fxdr_hyper tweaks to avoid excessive CPU order knowledge. nfs_serv.c: don't call nfsm_adj() with negative values, windows clients could crash servers when doing a readdir of a large directory. nfs_socket.c: Use IP_PORTRANGE to get a priviliged port without a spin loop trying to bind(). Don't clobber a mbuf pointer or we get panics on a NFS3ERR_JUKEBOX error from a server when reusing a freed mbuf. nfs_subs.c: Don't loose st_blocks on NFSv2 mounts when > 2GB. Obtained from: OpenBSD --- sys/nfsclient/nfsm_subs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/nfsclient/nfsm_subs.h') diff --git a/sys/nfsclient/nfsm_subs.h b/sys/nfsclient/nfsm_subs.h index 3692b7b..71d9f7b 100644 --- a/sys/nfsclient/nfsm_subs.h +++ b/sys/nfsclient/nfsm_subs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsm_subs.h 8.2 (Berkeley) 3/30/95 - * $Id: nfsm_subs.h,v 1.21 1998/05/31 20:08:57 peter Exp $ + * $Id: nfsm_subs.h,v 1.22 1998/12/25 10:34:27 dfr Exp $ */ @@ -264,7 +264,7 @@ struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid, if ((full) && (a)->va_size != VNOVAL) { \ nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED); \ *tl++ = nfs_true; \ - txdr_hyper(&(a)->va_size, tl); \ + txdr_hyper((a)->va_size, tl); \ } else { \ nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED); \ *tl = nfs_false; \ @@ -479,7 +479,7 @@ struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid, nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \ if (*tl == nfs_true) { \ nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); \ - fxdr_hyper(tl, &(a)->va_size); \ + (a)->va_size = fxdr_hyper(tl); \ } \ nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \ switch (fxdr_unsigned(int, *tl)) { \ -- cgit v1.1