From 564e37fd87f18fc51f5b438714da044be0ec0770 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 17 Jun 2012 19:47:34 -0700 Subject: [PATCH] --- yaml --- r: 314294 b: refs/heads/master c: 6fac262526ee91ee66210b8919a4297dcf7d544e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ipv4/fib_semantics.c | 7 ++++++- trunk/net/ipv4/route.c | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 6b897dd34dc8..bc2448eadf96 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a7e2eaadd0edf6d71637c0d99aca404b0da8c1be +refs/heads/master: 6fac262526ee91ee66210b8919a4297dcf7d544e diff --git a/trunk/net/ipv4/fib_semantics.c b/trunk/net/ipv4/fib_semantics.c index e5b7182fa099..415f8230fc88 100644 --- a/trunk/net/ipv4/fib_semantics.c +++ b/trunk/net/ipv4/fib_semantics.c @@ -779,9 +779,14 @@ struct fib_info *fib_create_info(struct fib_config *cfg) int type = nla_type(nla); if (type) { + u32 val; + if (type > RTAX_MAX) goto err_inval; - fi->fib_metrics[type - 1] = nla_get_u32(nla); + val = nla_get_u32(nla); + if (type == RTAX_ADVMSS && val > 65535 - 40) + val = 65535 - 40; + fi->fib_metrics[type - 1] = val; } } } diff --git a/trunk/net/ipv4/route.c b/trunk/net/ipv4/route.c index 41df5297a412..a91f6d33804c 100644 --- a/trunk/net/ipv4/route.c +++ b/trunk/net/ipv4/route.c @@ -1951,8 +1951,6 @@ static void rt_set_nexthop(struct rtable *rt, const struct flowi4 *fl4, if (dst_mtu(dst) > IP_MAX_MTU) dst_metric_set(dst, RTAX_MTU, IP_MAX_MTU); - if (dst_metric_raw(dst, RTAX_ADVMSS) > 65535 - 40) - dst_metric_set(dst, RTAX_ADVMSS, 65535 - 40); #ifdef CONFIG_IP_ROUTE_CLASSID #ifdef CONFIG_IP_MULTIPLE_TABLES