httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip A. Prindeville" <phil...@enteka.com>
Subject Forcing the MSS
Date Wed, 20 Aug 1997 18:24:57 GMT
I have a couple of questions here...  more on the packet radio network.
I thought that on Solaris and other BSD derived systems, if the two
end-points of a TCP connection were not on the same subnet, then you
are supposed to use a 536 byte MSS (576 IP min unfragmented packet size
- 20 bytes of IP header - 20 bytes of TCP header).  Well, a quick
tcpdump showed that this wasn't the case.  So, I looked at the value
of tcp_mss_def on my system (yup, it's Solaris) and it was 536 but I
was seeing an MSS of 1460 (1500 - 20 - 20)...

Perhaps this was some "optimization" Sun made or the Path MTU code
gone nuts, so I decided to add another homebrewed option into Apache
(1.2.3) to force the socket MSS to something smaller than won't get
fragmented.  So, in make_sock(), I call a function that does:

    if (setsockopt(s, IPPROTO_TCP, TCP_MAXSEG, (char*)&mss, sizeof(mss)) < 0) {
        log_unixerr("setsockopt", "(TCP_MAXSEG)", NULL, server_conf);
    }

and sure enough, the error message is getting logged:

[Wed Aug 20 02:21:03 1997] setsockopt: (TCP_MAXSEG): Option not supported by protocol

Tell me I'm not missing something obvious.  How can it not be
supported by the protocol?  The socket is (AF_INET, SOCK_STREAM,
IPPROTO_TCP)!!

-Philip

Mime
View raw message