diff options
author | dfr <dfr@FreeBSD.org> | 1997-04-22 17:38:01 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1997-04-22 17:38:01 +0000 |
commit | 5a956ea098ef7e4fa34e7c350250c3b0a1919b4f (patch) | |
tree | 85ac37647fa6da547b4cb5bdab4e7cd51dcf8f22 /sys/nfsserver | |
parent | 7f078631641bbf1b5e5cb26bddb5c17e5aa8e7be (diff) | |
download | FreeBSD-src-5a956ea098ef7e4fa34e7c350250c3b0a1919b4f.zip FreeBSD-src-5a956ea098ef7e4fa34e7c350250c3b0a1919b4f.tar.gz |
Fix broken usage of nm_readdirsize and increase the socket buffers for UDP
to prevent possible socket overflows.
2.2 candidate.
PR: kern/3304
Reviewed by: Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
Diffstat (limited to 'sys/nfsserver')
-rw-r--r-- | sys/nfsserver/nfs_srvsock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index a584d97..86ac106 100644 --- a/sys/nfsserver/nfs_srvsock.c +++ b/sys/nfsserver/nfs_srvsock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.21 1997/02/22 09:42:39 peter Exp $ + * $Id: nfs_socket.c,v 1.22 1997/03/22 06:53:08 bde Exp $ */ /* @@ -270,8 +270,8 @@ nfs_connect(nmp, rep) so->so_snd.sb_timeo = 0; } if (nmp->nm_sotype == SOCK_DGRAM) { - sndreserve = nmp->nm_wsize + NFS_MAXPKTHDR; - rcvreserve = nmp->nm_rsize + NFS_MAXPKTHDR; + sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2; + rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2; } else if (nmp->nm_sotype == SOCK_SEQPACKET) { sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2; rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR) * 2; |