Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
TCP MSS in IPv6
When a IPv6 TCP session initiated by a NetBSD machine (running
6.1_STABLE and 7.0_RC1, amd64), the SYN packet includes TCP MSS option
of 1440 when it is sent over an ethernet interface. When the server
running NetBSD 6.1 responds by a TCP segment whose size is 1440 after
TCP session is established, the segment results in two fragments.
I am not tested on NetBSD-Current, however, tcp_mss_to_advertise()
in netinet/tcp_subr.c doesn't change a lot from 6.1 or 7.0RC1, and
same result would happen.
When I forced to set mss to 1280 in tcp_mss_to_advertise(), in 6.1,
the change is just below, the MSS option in SYN message in IPv6 TCP
becomes 1220 and no fragmentation happens.
***************
*** 1897,1902 ****
--- 1897,1903 ----
#ifdef INET6
case AF_INET6:
mss = max(in6_maxmtu, mss);
+ mss = 1280;
break;
#endif
}
While I have no idea what logic is the best at this moment, it should be
able to choose which policy will apply per connection basis possibly with
a socket option:
- happy with 1280
- try larger MSS with PMTU
Default policy can be specified net.inet6.ip6.mtudisc sysctl variable,
for example.
-- Akira Kato
Home |
Main Index |
Thread Index |
Old Index