summaryrefslogtreecommitdiff
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-10 07:02:09 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-10 22:40:15 -0700
commit710ab6c03122cf464510f8c86eb0a179e80b2d61 (patch)
tree062da3050c7a81c0c88a622caf302fe07e109647 /net/ipv4/fib_semantics.c
parent5943634fc5592037db0693b261f7f4bea6bb9457 (diff)
ipv4: Enforce max MTU metric at route insertion time.
Rather than at every struct rtable creation. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r--net/ipv4/fib_semantics.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index ae301c897a19..d71bfbdc0bf4 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -794,6 +794,8 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
val = nla_get_u32(nla);
if (type == RTAX_ADVMSS && val > 65535 - 40)
val = 65535 - 40;
+ if (type == RTAX_MTU && val > 65535 - 15)
+ val = 65535 - 15;
fi->fib_metrics[type - 1] = val;
}
}