correct description for TCP_MAXSEG on morden kernel
Hi lepton,
Quoted 11 lines · lepton
Hi Michael,
I think you have to revert this patch or revise it.
There is a patch in linux 2.6.27 to fix this issue in kernel side, so
The original statement is true for linux <= 2.2 and linux >= 2.6.27 now.
This is the correspoding kernel patch for fix this.
Thanks for catching that! So, looking at the diffs, this change actually went into mainline in 2.6.28 (it went into the .27 *stable branch*...). So, it seems to me the patch should now rather be:
=====
man7/tcp.7 +0 -0
@@ -888,7 +888,8 @@ This option should not be used in code intended to
be portable.
.B TCP_MAXSEG
.\" Present in Linux 1.0
The maximum segment size for outgoing TCP packets.
-If this option is set before connection establishment, it also +In Linux 2.2 and earlier, and in Linux 2.6.28 and later, +if this option is set before connection establishment, it also
changes the MSS value announced to the other end in the initial packet. Values greater than the (eventual) interface MTU have no effect. TCP will also impose
=====
Right?
Cheers,
Michael
Quoted 56 lines · 在 2012年4月23日 下午5:18,Michael Kerrisk (man-pages)…
Quoted 55 lines · lepton
Quoted 23 lines
Hi,
In tcp.7, aboutTCP_MAXSEG, it reads "If this option is set before connection establishment, it also changes the MSS value announced to the other end in the initial packet."
It is correct for kernel version 2.2, but it is not correct for modern kernel such as 2.4 and 2.6. On a linux box with a modern kernel, the setting forTCP_MAXSEGwon't change the MSS value announced to the other end.
The following patch fix this.
Thanks.diff -pru man-pages-2.44/man7/tcp.7 man-pages-2.44-lepton/man7/tcp.7
man7/tcp.7 2007-04-28 18:03:18.000000000 +0800 renamed from man7/tcp.7 2006-09-07 15:28:56.000000000 +0800 +0
-0@@ -645,7 +645,8 @@ This option should not be used in code iportable.
.TP
.BTCP_MAXSEGman7/tcp.7 2007-04-28 18:03:18.000000000 +0800 renamed from man7/tcp.7 2006-09-07 15:28:56.000000000 +0800 +2
-1-The maximum segment size for outgoing TCP packets. If this +The maximum segment size for outgoing TCP packets. For +some linux kernel version such as 2.2.x, if thisQuoted 3 lines
option is set before connection establishment, it also changes the MSS value announced to the other end in the initial packet. Values greater than the (eventual)
Thanks.I applied the patch below for man-pages-3.40.
Cheers,
Michael
man7/tcp.7 +0
-0@@ -888,7 +888,8 @@ This option should not be used in code intended tobe portable.
.BTCP_MAXSEG
.\" Present in Linux 1.0
The maximum segment size for outgoing TCP packets.man7/tcp.7 +2
-1-If this option is set before connection establishment, it also +In Linux 2.2 and earlier, +if this option is set before connection establishment, it alsochanges the MSS value announced to the other end in the initial packet. Values greater than the (eventual) interface MTU have no effect. TCP will also impose
lines 1-23/23 (END)--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface"; http://man7.org/tlpi/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html