diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-08-18 12:33:31 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-08-18 12:33:31 +0800 |
| commit | fdd85431d91c9da37e9e696eb8fe80f1a2dcdbeb (patch) | |
| tree | ac60b28ebed345df274ce42aa3c9f3ee091875d1 /net/ipv4/fib_semantics.c | |
| parent | e01035c1a71d7cceebc3df92f79577df7438523a (diff) | |
| parent | e779279da78339ec75fa72571ef901a447762cc6 (diff) | |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'net/ipv4/fib_semantics.c')
| -rw-r--r-- | net/ipv4/fib_semantics.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 2b68418c7198..ffe95d954007 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -479,6 +479,9 @@ static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh, if (!rtnh_ok(rtnh, remaining)) return -EINVAL; + if (rtnh->rtnh_flags & (RTNH_F_DEAD | RTNH_F_LINKDOWN)) + return -EINVAL; + nexthop_nh->nh_flags = (cfg->fc_flags & ~0xFF) | rtnh->rtnh_flags; nexthop_nh->nh_oif = rtnh->rtnh_ifindex; @@ -1003,6 +1006,9 @@ struct fib_info *fib_create_info(struct fib_config *cfg) if (fib_props[cfg->fc_type].scope > cfg->fc_scope) goto err_inval; + if (cfg->fc_flags & (RTNH_F_DEAD | RTNH_F_LINKDOWN)) + goto err_inval; + #ifdef CONFIG_IP_ROUTE_MULTIPATH if (cfg->fc_mp) { nhs = fib_count_nexthops(cfg->fc_mp, cfg->fc_mp_len); |
