]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 11 Aug 2017 10:37:02 +0000 (12:37 +0200)
commitf7cae64fd9a81f0580b1cefe270c585103aa31be
tree27807cea1b7375a0a11f98d45f7a9e046044d121
parentd82b34ebd74550d857a8dd7a0fb228702f6422fc
net: ipv6: Compare lwstate in detecting duplicate nexthops

BugLink: http://bugs.launchpad.net/bugs/1705707
commit f06b7549b79e29a672336d4e134524373fb7a232 upstream.

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: 19e42e451506 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
include/net/ip6_route.h
net/ipv6/ip6_fib.c
net/ipv6/route.c