Skip to content

Commit edd7ceb

Browse files
thomasjwinterdavem330
authored andcommitted
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: Thomas Winter <[email protected]> Cc: David Ahern <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Alexey Kuznetsov <[email protected]> Cc: Hideaki YOSHIFUJI <[email protected]> Acked-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d656fe4 commit edd7ceb

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

include/net/ip6_route.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ static inline bool rt6_need_strict(const struct in6_addr *daddr)
6868

6969
static inline bool rt6_qualify_for_ecmp(const struct rt6_info *rt)
7070
{
71-
return (rt->rt6i_flags & (RTF_GATEWAY|RTF_ADDRCONF|RTF_DYNAMIC)) ==
72-
RTF_GATEWAY;
71+
return (rt->rt6i_flags & (RTF_ADDRCONF | RTF_DYNAMIC)) == 0;
7372
}
7473

7574
void ip6_route_input(struct sk_buff *skb);

net/ipv6/ip6_fib.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,9 +934,6 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
934934
* list.
935935
* Only static routes (which don't have flag
936936
* RTF_EXPIRES) are used for ECMPv6.
937-
*
938-
* To avoid long list, we only had siblings if the
939-
* route have a gateway.
940937
*/
941938
if (rt_can_ecmp &&
942939
rt6_qualify_for_ecmp(iter))

0 commit comments

Comments
 (0)