Date: Sun, 19 Jan 1997 06:30:17 +0700 From: Eka Kelana <eka@werty.wasantara.net.id> To: mbarkah@hemi.com Cc: freebsd-bugs@freebsd.org, freebsd-hackers@freebsd.org, dg@root.com Subject: Re: bug in setsockopt()... ? Message-ID: <2869F9343EB@bandung.wasantara.net.id>
next in thread | raw e-mail | index | archive | help
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 <mss 1460> (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2869F9343EB>