summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2007-02-09 17:18:39 +0000
committeryar <yar@FreeBSD.org>2007-02-09 17:18:39 +0000
commit7788a539e610403a7b34e90fde3c3fe67f48968d (patch)
tree17b9ff93f5cc774d561e918ae7234c6b3a3d6c30 /libexec/ftpd
parentd6a37ef6957fcf391e0acef372f639e4339e078d (diff)
downloadFreeBSD-src-7788a539e610403a7b34e90fde3c3fe67f48968d.zip
FreeBSD-src-7788a539e610403a7b34e90fde3c3fe67f48968d.tar.gz
Let automatic TCP send buffer sizing do its job for ftpd(8): stop
setting the SO_SNDBUF socket option. Using a hard-coded value for it was a poor idea anyway in the face of diverse network conditions.
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpd.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index f331a47..1a6a373 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1871,20 +1871,12 @@ getdatasock(char *mode)
#ifdef TCP_NOPUSH
/*
* Turn off push flag to keep sender TCP from sending short packets
- * at the boundaries of each write(). Should probably do a SO_SNDBUF
- * to set the send buffer size as well, but that may not be desirable
- * in heavy-load situations.
+ * at the boundaries of each write().
*/
on = 1;
if (setsockopt(s, IPPROTO_TCP, TCP_NOPUSH, &on, sizeof on) < 0)
syslog(LOG_WARNING, "data setsockopt (TCP_NOPUSH): %m");
#endif
-#ifdef SO_SNDBUF
- on = 65536;
- if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &on, sizeof on) < 0)
- syslog(LOG_WARNING, "data setsockopt (SO_SNDBUF): %m");
-#endif
-
return (fdopen(s, mode));
bad:
/* Return the real value of errno (close may change it) */
OpenPOWER on IntegriCloud