Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp PR/25566: Anders Magnusson: ftp(1) do not like l...
details: https://anonhg.NetBSD.org/src/rev/2ec5d4743ce3
branches: trunk
changeset: 566630:2ec5d4743ce3
user: christos <christos%NetBSD.org@localhost>
date: Fri May 14 18:39:21 2004 +0000
description:
PR/25566: Anders Magnusson: ftp(1) do not like large TCP windows.
Limit it to 8M.
diffstat:
usr.bin/ftp/main.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 4d67e0b8034d -r 2ec5d4743ce3 usr.bin/ftp/main.c
--- a/usr.bin/ftp/main.c Fri May 14 17:00:21 2004 +0000
+++ b/usr.bin/ftp/main.c Fri May 14 18:39:21 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.86 2003/08/07 11:13:56 agc Exp $ */
+/* $NetBSD: main.c,v 1.87 2004/05/14 18:39:21 christos Exp $ */
/*-
* Copyright (c) 1996-2002 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: main.c,v 1.86 2003/08/07 11:13:56 agc Exp $");
+__RCSID("$NetBSD: main.c,v 1.87 2004/05/14 18:39:21 christos Exp $");
#endif
#endif /* not lint */
@@ -214,9 +214,14 @@
(void)close(s);
/* sanity check returned buffer sizes */
if (rcvbuf_size <= 0)
- rcvbuf_size = 8192;
+ rcvbuf_size = 8 * 1024;
if (sndbuf_size <= 0)
- sndbuf_size = 8192;
+ sndbuf_size = 8 * 1024;
+
+ if (sndbuf_size > 8 * 1024 * 1024)
+ sndbuf_size = 8 * 1024 * 1024;
+ if (rcvbuf_size > 8 * 1024 * 1024)
+ rcvbuf_size = 8 * 1024 * 1024;
marg_sl = xsl_init();
if ((tmpdir = getenv("TMPDIR")) == NULL)
Home |
Main Index |
Thread Index |
Old Index