Skip to content

Commit

Permalink
ipv6/multipath: remove flag NLM_F_EXCL after the first nexthop
Browse files Browse the repository at this point in the history
fib6_add_rt2node() will reject the nexthop if this flag is set, so
we perform the check only for the first nexthop.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nicolas Dichtel authored and David S. Miller committed Nov 3, 2012
1 parent 2bc8005 commit 1a72418
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,12 @@ static int ip6_route_multipath(struct fib6_config *cfg, int add)
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).
*/
cfg->fc_nlinfo.nlh->nlmsg_flags &= ~NLM_F_EXCL;
rtnh = rtnh_next(rtnh, &remaining);
}

Expand Down

0 comments on commit 1a72418

Please sign in to comment.