Hi lepton, On Wed, Apr 25, 2012 at 9:46 PM, lepton <ytht.net@xxxxxxxxx> wrote: > 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. > > https://lkml.org/lkml/2009/6/30/499 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: ===== --- a/man7/tcp.7 +++ b/man7/tcp.7 @@ -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 > 在 2012年4月23日 下午5:18,Michael Kerrisk (man-pages) <mtk.manpages@xxxxxxxxx> 写道: >> On Sat, Apr 28, 2007 at 10:05 PM, lepton <ytht.net@xxxxxxxxx> wrote: >>> Hi, >>> In tcp.7, about TCP_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 for >>> TCP_MAXSEG won'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 >>> --- man-pages-2.44/man7/tcp.7 2006-09-07 15:28:56.000000000 +0800 >>> +++ man-pages-2.44-lepton/man7/tcp.7 2007-04-28 18:03:18.000000000 +0800 >>> @@ -645,7 +645,8 @@ This option should not be used in code i >>> portable. >>> .TP >>> .B TCP_MAXSEG >>> -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 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) >> >> Thanks.I applied the patch below for man-pages-3.40. >> >> Cheers, >> >> Michael >> >> --- a/man7/tcp.7 >> +++ b/man7/tcp.7 >> @@ -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, >> +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 >> 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/ -- 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html