aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/fib_semantics.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-20 12:16:43 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-20 12:16:43 +0800
commit1d53a9c6e6c7bc32ecfbbb024ab7a1955122c526 (patch)
tree977cfcbda4ef5173a9455e66350b610e96f1eeef /net/ipv4/fib_semantics.c
parenta8a1fcae2dcc97748b7cafa7cb2745de1f35a8a6 (diff)
parent510d0a3f869611dcd001a2b7627fa5dded4579af (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-rtlsk-v4.4-16.05-rt
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 d97268e8ff10..2b68418c7198 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -975,6 +975,8 @@ fib_convert_metrics(struct fib_info *fi, const struct fib_config *cfg)
val = 65535 - 40;
if (type == RTAX_MTU && val > 65535 - 15)
val = 65535 - 15;
+ if (type == RTAX_HOPLIMIT && val > 255)
+ val = 255;
if (type == RTAX_FEATURES && (val & ~RTAX_FEATURE_MASK))
return -EINVAL;
fi->fib_metrics[type - 1] = val;