From nobody@FreeBSD.org  Thu May 18 17:57:46 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 92D8D16A53A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 May 2006 17:57:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1AC4043D45
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 May 2006 17:57:46 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k4IHvjO9019807
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 May 2006 17:57:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k4IHvjBA019806;
	Thu, 18 May 2006 17:57:45 GMT
	(envelope-from nobody)
Message-Id: <200605181757.k4IHvjBA019806@www.freebsd.org>
Date: Thu, 18 May 2006 17:57:45 GMT
From: Kurt Lidl <kurt.lidl@cello.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ftpd has no way to specify socket buffer sizes on the command line
X-Send-Pr-Version: www-2.3

>Number:         97467
>Category:       bin
>Synopsis:       [patch] ftpd(8) has no way to specify socket buffer sizes on the command line
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 18 18:00:31 GMT 2006
>Closed-Date:    Fri Jun 15 09:51:47 GMT 2007
>Last-Modified:  Fri Jun 15 09:51:47 GMT 2007
>Originator:     Kurt Lidl
>Release:        FreeBSD 5.3 on x86 hardware
>Organization:
Cello Software
>Environment:
FreeBSD smdr.cello.com 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov  5 04:19:18 UTC 2004     root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The stock ftpd will set the SO_SNDBUF to 64K by default, but has no setting
of the SO_RCVBUF socket option.  Neither of these buffer sizes can be changed
on the command line.

You can use the 'tcpdump' command to examine the TCP handshaking and see that
the window sizes negotiation is offered at 64K.

>How-To-Repeat:

>Fix:
Apply the following patch:

begin 644 ftpd.patch.bz2
M0EIH.3%!629366F-)Q```:9_@$`P0`![___?_^_?RK_OW_A0!;B\JF:YM;C<
MU``D$H@E/2>$GM4>HTQ&1D`!IIIH`#0&C0`2DJ>>*3:*:>4:`:```>H````-
M`!*:(DU/)DU/2(P8U)IHT/4R`T:&FAZ0`&C0XT9,C",0#":#`)H-`R9-&3(8
M0&$D1,@`AHT%-3U'ZIZ:ADS4>B>D:`-/4`'J9$!:39"$!F"!H('9"!UKIXAW
M=G^ZD$]S<Z#.44#"/R.5)0Y4\29X4F!8<-8_72MK;W>/$$\U1TJN)M*-2IT/
MTGUZ,OBK*'5>.Y#A47DB^;EUO%&A1KF,>0R>=^!\$U$65-,J_%I@<&AFET!)
M!6":91$N"@-P.%R*0_C:';M<+$=32M&:!ZL/A;M95G0E<;LA&)Z%Z1IU@QS;
MU;0UGMS9BZ!Z3="!0Q*N&&RT;+7Y<=R[\^6*D&VU5450T>"5XQJ061C"X_4<
MZ+2?UQD62<>&D2P@3**#S.>#TA(._SRK+BKF>*XB/7DM3%-^\JU)"Y-2D8M-
M)G-GA!S*!IEN;`=,M3*CDBF<*S:?+`O5V\,YXUV8CQJ/&V+T/'&PJFK1E#;8
M6QUM8TEZ*Z3J+&Y'::P[B`MXR1]_7SYQ5XV9K!PR^YTI_LD#P'@S)C.7DW%R
M;/*>PML.7F1(N$5^ELB0A#'H6A;S,QMB$(!V9#;%YI^`6%J[1@'&VGBNJ;=C
M([3CLO*MGBM7^G68S`L3GN961+P*5T"];9548Q*AL$LP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L8I;R\9H*:J2;:QB3#]\D$-EM:X5PQ,
MXIT9I04"^,@%<-@.]#H(E3\2SXEQ0EG,8Z:/78L*)X5>M,XBY3SA;#ABYC'<
3&IQ\I!6@F'_B[DBG"A(-,:3B````
`
end

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: yar 
State-Changed-When: Sat Feb 10 06:40:12 UTC 2007 
State-Changed-Why:  
In CURRENT, TCP buffers are sized automatically to fit network 
conditions, which removes the need to set their sizes manually. 
The ftpd(8) daemon now takes advantage of the new feature. 
OTOH, given the age of this problem, I'm not inclined to apply 
a fix solely to 6-STABLE. 
So I think this PR can be closed.  Thanks! 


Responsible-Changed-From-To: freebsd-bugs->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Sat Feb 10 06:40:12 UTC 2007 
Responsible-Changed-Why:  
Taking this ftpd-related PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97467 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Fri Jun 15 09:50:58 UTC 2007 
State-Changed-Why:  
Feedback timeout.  It seems as though this will be fixed in 7.0 but is not 
a candidate for MFC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97467 
>Unformatted:
