[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080828.024617.117112334.davem@davemloft.net>
Date: Thu, 28 Aug 2008 02:46:17 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: virtualphtn@...il.com
Cc: netdev@...r.kernel.org, lachlan.andrew@...il.com
Subject: Re: [PATCH][BUG] tcp: advertise MSS requested by user
From: Tom Quetchenbach <virtualphtn@...il.com>
Date: Tue, 26 Aug 2008 11:11:52 -0700
> I'm trying to use the TCP_MAXSEG option to setsockopt() to set the MSS
> for both sides of a bidirectional connection.
>
> man tcp says: "If this option is set before connection establishment, it
> also changes the MSS value announced to the other end in the initial
> packet."
>
> However, the kernel only uses the MTU/route cache to set the advertised
> MSS. That means if I set the MSS to, say, 500 before calling connect(),
> I will send at most 500-byte packets, but I will still receive 1500-byte
> packets in reply.
>
> This is a bug, either in the kernel or the documentation.
I think this got broken by accident several years ago, shows how many
people use this feature :)
We used to use ->mss_clamp to determine the MSS option value,
but along the way when all of the code using ->advmss et al.
was added it didn't get translated correctly.
Thanks for your patch, I'll mull over this and put in the fix
once I understand exactly how this got broken.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists