From owner-freebsd-bugs Thu Jan 24 5: 0:14 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 81C5737B404 for ; Thu, 24 Jan 2002 05:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0OD02m70391; Thu, 24 Jan 2002 05:00:02 -0800 (PST) (envelope-from gnats) Date: Thu, 24 Jan 2002 05:00:02 -0800 (PST) Message-Id: <200201241300.g0OD02m70391@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: kern/11966: TCP copies send and receive socket buffer sizes from routing information even when user applications set them Reply-To: Ruslan Ermilov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/11966; it has been noted by GNATS. From: Ruslan Ermilov To: Ian Dowse 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