netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ipv6: fix mss when it is bigger than IPV6_MAXPLEN - sizeof(struct tcphdr)
@ 2012-02-28  8:28 roy.qing.li
  2012-02-28  8:28 ` [PATCH 2/2] ipv4: fix mss comparison roy.qing.li
  2012-02-28  9:56 ` [PATCH 1/2] ipv6: fix mss when it is bigger than IPV6_MAXPLEN - sizeof(struct tcphdr) Eric Dumazet
  0 siblings, 2 replies; 6+ messages in thread
From: roy.qing.li @ 2012-02-28  8:28 UTC (permalink / raw)
  To: netdev

From: RongQing.Li <roy.qing.li@gmail.com>

When mss is bigger than IPV6_MAXPLEN - sizeof(struct tcphdr),
set mss to IPV6_MAXPLEN - sizeof(struct tcphdr), not IPV6_MAXPLEN.

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
 net/ipv6/route.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 92be12b..42cc16c 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1054,7 +1054,7 @@ static unsigned int ip6_default_advmss(const struct dst_entry *dst)
 	 * rely only on pmtu discovery"
 	 */
 	if (mtu > IPV6_MAXPLEN - sizeof(struct tcphdr))
-		mtu = IPV6_MAXPLEN;
+		mtu = IPV6_MAXPLEN - sizeof(struct tcphdr);
 	return mtu;
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-28 10:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-28  8:28 [PATCH 1/2] ipv6: fix mss when it is bigger than IPV6_MAXPLEN - sizeof(struct tcphdr) roy.qing.li
2012-02-28  8:28 ` [PATCH 2/2] ipv4: fix mss comparison roy.qing.li
2012-02-28  9:34   ` Francois Romieu
2012-02-28  9:55     ` RongQing Li
2012-02-28 10:01   ` Eric Dumazet
2012-02-28  9:56 ` [PATCH 1/2] ipv6: fix mss when it is bigger than IPV6_MAXPLEN - sizeof(struct tcphdr) Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).