diff options
-rw-r--r-- | include/net/ip6_route.h | 5 | ||||
-rw-r--r-- | net/ipv6/route.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 3c3bb184eb8f..6c4f5eac98e7 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -32,6 +32,11 @@ struct route_info { | |||
32 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 | 32 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 |
33 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 | 33 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 |
34 | 34 | ||
35 | /* We do not (yet ?) support IPv6 jumbograms (RFC 2675) | ||
36 | * Unlike IPv4, hdr->seg_len doesn't include the IPv6 header | ||
37 | */ | ||
38 | #define IP6_MAX_MTU (0xFFFF + sizeof(struct ipv6hdr)) | ||
39 | |||
35 | /* | 40 | /* |
36 | * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate | 41 | * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate |
37 | * between IPV6_ADDR_PREFERENCES socket option values | 42 | * between IPV6_ADDR_PREFERENCES socket option values |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 5015c50a5ba7..5ea462eacd9f 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1338,7 +1338,7 @@ static unsigned int ip6_mtu(const struct dst_entry *dst) | |||
1338 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); | 1338 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); |
1339 | 1339 | ||
1340 | if (mtu) | 1340 | if (mtu) |
1341 | return mtu; | 1341 | goto out; |
1342 | 1342 | ||
1343 | mtu = IPV6_MIN_MTU; | 1343 | mtu = IPV6_MIN_MTU; |
1344 | 1344 | ||
@@ -1348,7 +1348,8 @@ static unsigned int ip6_mtu(const struct dst_entry *dst) | |||
1348 | mtu = idev->cnf.mtu6; | 1348 | mtu = idev->cnf.mtu6; |
1349 | rcu_read_unlock(); | 1349 | rcu_read_unlock(); |
1350 | 1350 | ||
1351 | return mtu; | 1351 | out: |
1352 | return min_t(unsigned int, mtu, IP6_MAX_MTU); | ||
1352 | } | 1353 | } |
1353 | 1354 | ||
1354 | static struct dst_entry *icmp6_dst_gc_list; | 1355 | static struct dst_entry *icmp6_dst_gc_list; |