]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv6: Compare lwstate in detecting duplicate nexthops
authorDavid Ahern <dsahern@gmail.com>
Wed, 5 Jul 2017 20:41:46 +0000 (14:41 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jul 2017 09:48:01 +0000 (10:48 +0100)
commit7062b230a54abbb5a75d6832a7e71c6ee082ce15
treefd4cee9ed88cffa5de743b4745bfc96bcc427376
parent7c0a1d50ce2d3bc373c9ab76f0299050e44ad68b
net: ipv6: Compare lwstate in detecting duplicate nexthops

Lennert reported a failure to add different mpls encaps in a multipath
route:

  $ ip -6 route add 1234::/16 \
        nexthop encap mpls 10 via fe80::1 dev ens3 \
        nexthop encap mpls 20 via fe80::1 dev ens3
  RTNETLINK answers: File exists

The problem is that the duplicate nexthop detection does not compare
lwtunnel configuration. Add it.

Fixes: 56a9aa4d9916 ("ipv6: support for fib route lwtunnel encap attributes")
Signed-off-by: David Ahern <dsahern@gmail.com>
Reported-by: João Taveira Araújo <joao.taveira@gmail.com>
Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Tested-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_route.h
net/ipv6/ip6_fib.c
net/ipv6/route.c