summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortedu <>2014-06-10 16:35:42 +0000
committertedu <>2014-06-10 16:35:42 +0000
commit46bdd6e88295daa9a571893aee696bbafb334e9f (patch)
tree7f9c92c9b9a8d374cf72e76bbabc6c1cd27377ef
parente5e947e5f5e67a5a5cc46dae95674e5186fa5af1 (diff)
downloadopenbsd-46bdd6e88295daa9a571893aee696bbafb334e9f.tar.gz
openbsd-46bdd6e88295daa9a571893aee696bbafb334e9f.tar.bz2
openbsd-46bdd6e88295daa9a571893aee696bbafb334e9f.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--src/usr.bin/nc/netcat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c
index 2861948dbf..76794df6c0 100644
--- a/src/usr.bin/nc/netcat.c
+++ b/src/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: netcat.c,v 1.120 2014/06/10 16:23:07 tedu Exp $ */ 1/* $OpenBSD: netcat.c,v 1.121 2014/06/10 16:35:42 tedu Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> 3 * Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
4 * 4 *
@@ -733,7 +733,7 @@ void
733readwrite(int nfd) 733readwrite(int nfd)
734{ 734{
735 struct pollfd pfd[2]; 735 struct pollfd pfd[2];
736 unsigned char buf[64 * 1024]; 736 unsigned char buf[16 * 1024];
737 int n, wfd = fileno(stdin); 737 int n, wfd = fileno(stdin);
738 int lfd = fileno(stdout); 738 int lfd = fileno(stdout);
739 int plen; 739 int plen;