summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-04-10 21:23:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-30 21:52:14 -0700
commit132da31a0b0143cac11799dafa961c1969ee122c (patch)
treecaf992b272e64c80eef10d82b5c564c93ee01391 /include
parent4902599654b2e606529241d06c5748c48ed6dc87 (diff)
downloadlinux-3.10-132da31a0b0143cac11799dafa961c1969ee122c.tar.gz
linux-3.10-132da31a0b0143cac11799dafa961c1969ee122c.tar.bz2
linux-3.10-132da31a0b0143cac11799dafa961c1969ee122c.zip
ipv6: Limit mtu to 65575 bytes
[ Upstream commit 30f78d8ebf7f514801e71b88a10c948275168518 ] Francois reported that setting big mtu on loopback device could prevent tcp sessions making progress. We do not support (yet ?) IPv6 Jumbograms and cook corrupted packets. We must limit the IPv6 MTU to (65535 + 40) bytes in theory. Tested: ifconfig lo mtu 70000 netperf -H ::1 Before patch : Throughput : 0.05 Mbits After patch : Throughput : 35484 Mbits Reported-by: Francois WELLENREITER <f.wellenreiter@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip6_route.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index b906f4a131a..8d977b34364 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -32,6 +32,11 @@ struct route_info {
#define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010
#define RT6_LOOKUP_F_SRCPREF_COA 0x00000020
+/* We do not (yet ?) support IPv6 jumbograms (RFC 2675)
+ * Unlike IPv4, hdr->seg_len doesn't include the IPv6 header
+ */
+#define IP6_MAX_MTU (0xFFFF + sizeof(struct ipv6hdr))
+
/*
* rt6_srcprefs2flags() and rt6_flags2srcprefs() translate
* between IPV6_ADDR_PREFERENCES socket option values