diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-08 10:34:44 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-08 10:34:44 -0700 |
commit | 6394d6d01bf0881823522f37601cbf880bc61087 (patch) | |
tree | e5827ff7dc8b63014d9b068037ce50a5861b0f46 /net/ipv6/route.c | |
parent | 084861124d00b046cb4159b0158e1b74626b8257 (diff) | |
parent | d4a4f75cd8f29cd9464a5a32e9224a91571d6649 (diff) | |
download | op-kernel-dev-6394d6d01bf0881823522f37601cbf880bc61087.zip op-kernel-dev-6394d6d01bf0881823522f37601cbf880bc61087.tar.gz |
Merge 4.1-rc7 into staging-testing
We want the staging tree fixes in here too to help with testing and
merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d358888..c73ae50 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2504,9 +2504,9 @@ static int ip6_route_multipath(struct fib6_config *cfg, int add) int attrlen; int err = 0, last_err = 0; + remaining = cfg->fc_mp_len; beginning: rtnh = (struct rtnexthop *)cfg->fc_mp; - remaining = cfg->fc_mp_len; /* Parse a Multipath Entry */ while (rtnh_ok(rtnh, remaining)) { @@ -2536,15 +2536,19 @@ beginning: * next hops that have been already added. */ add = 0; + remaining = cfg->fc_mp_len - remaining; goto beginning; } } /* Because each route is added like a single route we remove - * this flag after the first nexthop (if there is a collision, - * we have already fail to add the first nexthop: - * fib6_add_rt2node() has reject it). + * these flags after the first nexthop: if there is a collision, + * we have already failed to add the first nexthop: + * fib6_add_rt2node() has rejected it; when replacing, old + * nexthops have been replaced by first new, the rest should + * be added to it. */ - cfg->fc_nlinfo.nlh->nlmsg_flags &= ~NLM_F_EXCL; + cfg->fc_nlinfo.nlh->nlmsg_flags &= ~(NLM_F_EXCL | + NLM_F_REPLACE); rtnh = rtnh_next(rtnh, &remaining); } |