From owner-freebsd-hackers Sat Jan 18 15:45:17 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA05434 for hackers-outgoing; Sat, 18 Jan 1997 15:45:17 -0800 (PST) Received: from mailgate ([202.159.65.166]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id PAA05429; Sat, 18 Jan 1997 15:45:03 -0800 (PST) Received: from bandung.wasantara.net.id (bandung.wasantara.net.id [202.159.69.35]) by mailgate (8.6.11/8.6.9) with ESMTP id GAA27509; Sun, 19 Jan 1997 06:30:17 +0700 Date: Sun, 19 Jan 1997 06:30:17 +0700 Received: from BANDUNG/SpoolDir by bandung.wasantara.net.id (Mercury 1.21); 19 Jan 97 07:36:42 GMT+0700 Received: from SpoolDir by BANDUNG (Mercury 1.21); 19 Jan 97 07:36:22 GMT+0700 Received: from shuttle.wasantara.net.id by bandung.wasantara.net.id (Mercury 1.21); 19 Jan 97 07:36:13 GMT+0700 X-Sender: eka@werty.wasantara.net.id (Unverified) X-Mailer: Windows Eudora Pro Version 2.1.2 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: mbarkah@hemi.com From: Eka Kelana Subject: Re: bug in setsockopt()... ? Cc: freebsd-bugs@freebsd.org, freebsd-hackers@freebsd.org, dg@root.com Message-ID: <2869F9343EB@bandung.wasantara.net.id> Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 07:35 PM 1/16/97 -0700, you wrote: >The above is not true. The advertised window size for the SYN packet >will be whatever the SO_RCVBUF value is. For example, I wrote a sample >code that sets the SO_RCVBUF to 1024, and here's what tcpdump says on >connect: > >| 19:03:35.329442 gw.barkah.org.2087 > sushi.barkah.org.telnet: >| S 1719751503:1719751503(0) win 1024 (DF) > >As you can see, the win size is 1024, despite the default 16384. > Which buffer size of which side did you change? (there are two buffer, send and receive buffer, in sender and receiver side, no?) > >The window size advertised by the receiver is independent of the >sender, as it should be. Here's an example response from a Cisco >router: > Agreed ... >Here's output of a simple code which sets the receive buffer size >to 1024, then connects to a remote host, then resets the buffer size >and sends packets. > >The "Current receive buffer size" message prints out the value >returned from getsockopt(): > >| ./a.out >| Socket created, fd=3. >| Current receive buffer size is: 16384 <-- Initial value >| Setting buffer size to 1024 <-- Ok, make it 1k >| Current receive buffer size is: 1024 <-- Check, looks good >| Connect() to remote host successful >| Current receive buffer size is: 17520 <-- After connect, bug gets us >| Resetting buffer size to 1024 <-- See if we can set it to 1k ^^^^^^^^^ Did it really work? I couldn't change the buffer size after connect. I used setsockopt() function, but what did you use? I was wondering if you mind sending your code to me :-) It would be a big help. >As David Greenman points out, bug related to path mtu discovery code >(reasonable explanation to me, since the receive buffer size after >the connect() does vary with different MTU values.) > I'm now working on searching the source of bug in FreeBSD networking code. Can you confirm your explanation above by locating the code that do the path mtu discovery? Thank's mr. Barkah... Best regards, -Eka Kelana- STTTelkom