Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2002 05:00:02 -0800 (PST)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/11966: TCP copies send and receive socket buffer sizes from routing information even when user applications set them
Message-ID:  <200201241300.g0OD02m70391@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/11966; it has been noted by GNATS.

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Ian Dowse <iedowse@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/11966: TCP copies send and receive socket buffer sizes from routing information even when user applications set them
Date: Thu, 24 Jan 2002 14:59:38 +0200

 On Sun, Jan 20, 2002 at 09:56:02AM -0800, iedowse@FreeBSD.ORG wrote:
 > Synopsis: TCP copies send and receive socket buffer sizes from routing information even when user applications set them
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: iedowse
 > State-Changed-When: Sun Jan 20 09:55:44 PST 2002
 > State-Changed-Why: 
 > 
 > Does this problem still exist?
 > 
 Yes, and I think this patch (sitting in my RELENG_4 tree for over
 a year now, and I now almost forgot what it's about) should fix it:
 
 Index: tcp_input.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/netinet/tcp_input.c,v
 retrieving revision 1.107.2.20
 diff -u -p -r1.107.2.20 tcp_input.c
 --- tcp_input.c	2001/12/14 20:21:12	1.107.2.20
 +++ tcp_input.c	2002/01/24 12:55:22
 @@ -2615,7 +2615,8 @@ tcp_mss(tp, offer)
  		bufsize = roundup(bufsize, mss);
  		if (bufsize > sb_max)
  			bufsize = sb_max;
 -		(void)sbreserve(&so->so_snd, bufsize, so, NULL);
 +		if (bufsize > so->so_snd.sb_hiwat)
 +			(void)sbreserve(&so->so_snd, bufsize, so, NULL);
  	}
  	tp->t_maxseg = mss;
  
 @@ -2627,7 +2628,8 @@ tcp_mss(tp, offer)
  		bufsize = roundup(bufsize, mss);
  		if (bufsize > sb_max)
  			bufsize = sb_max;
 -		(void)sbreserve(&so->so_rcv, bufsize, so, NULL);
 +		if (bufsize > so->so_rcv.sb_hiwat)
 +			(void)sbreserve(&so->so_rcv, bufsize, so, NULL);
  	}
  
  	/*
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Oracle Developer/DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201241300.g0OD02m70391>