summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-06-10 16:35:42 +0000
committertedu <tedu@openbsd.org>2014-06-10 16:35:42 +0000
commit142886aa0255030ab0b6f9fb45484416dd474e04 (patch)
treecc631b67a3bd0f53410379e1ab7e1f766c576ae9
parentincrease buffer size to 64k, and actually use it. ok deraadt (diff)
downloadwireguard-openbsd-142886aa0255030ab0b6f9fb45484416dd474e04.tar.xz
wireguard-openbsd-142886aa0255030ab0b6f9fb45484416dd474e04.zip
stick with 16k buffers for a little while to avoid bufferbloat.
atomicio writing out 64k in one direction will cause traffic in the other direction to stall until it's complete. discussion with deraadt
-rw-r--r--usr.bin/nc/netcat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index 2861948dbf1..76794df6c0a 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.120 2014/06/10 16:23:07 tedu Exp $ */
+/* $OpenBSD: netcat.c,v 1.121 2014/06/10 16:35:42 tedu Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -733,7 +733,7 @@ void
readwrite(int nfd)
{
struct pollfd pfd[2];
- unsigned char buf[64 * 1024];
+ unsigned char buf[16 * 1024];
int n, wfd = fileno(stdin);
int lfd = fileno(stdout);
int plen;