Commit edd7ceb7 authored by Thomas Winter's avatar Thomas Winter Committed by David S. Miller

ipv6: Allow non-gateway ECMP for IPv6

It is valid to have static routes where the nexthop
is an interface not an address such as tunnels.
For IPv4 it was possible to use ECMP on these routes
but not for IPv6.
Signed-off-by: default avatarThomas Winter <Thomas.Winter@alliedtelesis.co.nz>
Cc: David Ahern <dsahern@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d656fe49
...@@ -68,8 +68,7 @@ static inline bool rt6_need_strict(const struct in6_addr *daddr) ...@@ -68,8 +68,7 @@ static inline bool rt6_need_strict(const struct in6_addr *daddr)
static inline bool rt6_qualify_for_ecmp(const struct rt6_info *rt) static inline bool rt6_qualify_for_ecmp(const struct rt6_info *rt)
{ {
return (rt->rt6i_flags & (RTF_GATEWAY|RTF_ADDRCONF|RTF_DYNAMIC)) == return (rt->rt6i_flags & (RTF_ADDRCONF | RTF_DYNAMIC)) == 0;
RTF_GATEWAY;
} }
void ip6_route_input(struct sk_buff *skb); void ip6_route_input(struct sk_buff *skb);
......
...@@ -934,9 +934,6 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, ...@@ -934,9 +934,6 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
* list. * list.
* Only static routes (which don't have flag * Only static routes (which don't have flag
* RTF_EXPIRES) are used for ECMPv6. * RTF_EXPIRES) are used for ECMPv6.
*
* To avoid long list, we only had siblings if the
* route have a gateway.
*/ */
if (rt_can_ecmp && if (rt_can_ecmp &&
rt6_qualify_for_ecmp(iter)) rt6_qualify_for_ecmp(iter))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment