From owner-cvs-all Mon Jul 22 15:35:27 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91B7F37B400; Mon, 22 Jul 2002 15:35:08 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id F207143E3B; Mon, 22 Jul 2002 15:35:02 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g6MMYte34855; Tue, 23 Jul 2002 01:34:55 +0300 (EEST) (envelope-from ru) Date: Tue, 23 Jul 2002 01:34:55 +0300 From: Ruslan Ermilov To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Cc: net@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_input.c Message-ID: <20020722223455.GA34550@sunbay.com> References: <200207222231.g6MMVA5Y009413@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wzJLGUyc3ArbnUjN" Content-Disposition: inline In-Reply-To: <200207222231.g6MMVA5Y009413@freefall.freebsd.org> User-Agent: Mutt/1.3.99i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --wzJLGUyc3ArbnUjN Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 22, 2002 at 03:31:10PM -0700, Ruslan Ermilov wrote: > ru 2002/07/22 15:31:10 PDT >=20 > Modified files: > sys/netinet tcp_input.c=20 > Log: > Don't shrink socket buffers in tcp_mss(), application might have already > configured them with setsockopt(SO_*BUF), for RFC1323's scaled windows. > =20 > PR: kern/11966 > MFC after: 1 week > =20 > Revision Changes Path > 1.166 +4 -2 src/sys/netinet/tcp_input.c >=20 The attached program could be used as a regression test. Cheers, --=20 Ruslan Ermilov Sysadmin and 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 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tcp.c" #include #include #include #include #include #include #include int main(int argc __unused, char *argv[] __unused) { int s; struct sockaddr_in addr; char data[100]; int optval; socklen_t optlen; if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) err(1, "socket"); addr.sin_len = sizeof addr; addr.sin_family = AF_INET; addr.sin_port = htons(9); /* discard */ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); if (getsockopt(s, SOL_SOCKET, SO_RCVBUF, &optval, &optlen) == -1) err(1, "getsockopt"); printf("default rcv. buffer size: %d bytes\n", optval); optval = 80000; if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &optval, optlen) == -1) err(1, "setsockopt"); if (getsockopt(s, SOL_SOCKET, SO_RCVBUF, &optval, &optlen) == -1) err(1, "getsockopt"); printf("rcv. buffer size after setsockopt(): %d bytes\n", optval); if (connect(s, (struct sockaddr *)&addr, sizeof addr) == -1) err(1, "connect"); if (getsockopt(s, SOL_SOCKET, SO_RCVBUF, &optval, &optlen) == -1) err(1, "getsockopt"); printf("rcv. buffer size after connect(): %d bytes\n", optval); if (send(s, data, sizeof data, 0) == -1) err(1, "send"); if (getsockopt(s, SOL_SOCKET, SO_RCVBUF, &optval, &optlen) == -1) err(1, "getsockopt"); printf("rcv. buffer size after send(): %d bytes\n", optval); if (shutdown(s, SHUT_RDWR) == -1) err(1, "shutdown"); exit(0); } --6TrnltStXW4iwmi0-- --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9PIiPUkv4P6juNwoRApPnAJ9D4pWx6ecz9ccd/xnduVgS7XrqaQCfUkcL yGHkVUMdYOhvRCDJbf3e9Is= =8aBI -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message