From 8ca3690f374266d9f1243632b87f906b80bb4fff Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 20 Apr 2010 07:28:29 +0000 Subject: Bump the default buffer sizes to be larger than default MTUs, from Jan Zeleny. ok djm --- usr.bin/nc/netcat.c | 10 +++++----- 1 file 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 * @@ -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; -- cgit v1.2.3