Ability to change MSS using TCP_MAXSEG

From: Jerry Fox
Date: Fri Mar 03 2006 - 17:28:49 EST


Hello-

I'll post this time with mentioning "advertised" MSS
in the subject :-)

I have a question about the advertised MSS and the
TCP_MAXSEG setsock option. Note: I am using the
Stevens sock code (http://www.unpbook.com/src.html) to
do testing.

I set the TCP_MAXSEG via ?X to 256 (yes, I
intentionally want poor performance), and used gdb to
verify that setsockopt gets called before the
connect() call, as described in the tcp (7) manpage.
However, Ethereal shows the advmss is still 1460.
Looking in the kernel
(net/ipv4/tcp_output.c::tcp_connect_init), I can see
the mss_clamp gets the user_mss, but the advmss is
still calculated based on dst_metric. Host route MTU
settings and interface MTU settings work as expected,
but is there a way to advertise a different MSS per
session/socket?

For ref, I see the same behavior on:
IA64+Debian/HPCGL+2.4.20
X86+Fedora+2.6.15
PPC+MontaVista+2.6.14

Please cc: me personally on any replies.

Thanks!
Jerry Fox



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/