summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-04-20 07:28:29 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-04-20 07:28:29 +0000
commit8ca3690f374266d9f1243632b87f906b80bb4fff (patch)
treecda4c86829c42cabdc5162503eb021af5a63deab
parent81d0afb02a8f980c40b1fd4d977902b856f5dbe4 (diff)
Bump the default buffer sizes to be larger than default MTUs, from Jan
Zeleny. ok djm
-rw-r--r--usr.bin/nc/netcat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index 3c845966bd0..df68805bd9d 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.96 2010/04/20 07:26:34 nicm Exp $ */
+/* $OpenBSD: netcat.c,v 1.97 2010/04/20 07:28:28 nicm Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -323,11 +323,11 @@ main(int argc, char *argv[])
*/
if (uflag) {
int rv, plen;
- char buf[8192];
+ char buf[16384];
struct sockaddr_storage z;
len = sizeof(z);
- plen = jflag ? 8192 : 1024;
+ plen = jflag ? 16384 : 2048;
rv = recvfrom(s, buf, plen, MSG_PEEK,
(struct sockaddr *)&z, &len);
if (rv < 0)
@@ -619,12 +619,12 @@ void
readwrite(int nfd)
{
struct pollfd pfd[2];
- unsigned char buf[8192];
+ unsigned char buf[16384];
int n, wfd = fileno(stdin);
int lfd = fileno(stdout);
int plen;
- plen = jflag ? 8192 : 1024;
+ plen = jflag ? 16384 : 2048;
/* Setup Network FD */
pfd[0].fd = nfd;