]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv6: Fix updates to prefix route
authorDavid Ahern <dsahern@gmail.com>
Thu, 28 Jun 2018 20:36:55 +0000 (13:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 11:49:58 +0000 (20:49 +0900)
commit1aff0b2c2e87458fca5b92b18a74da72b6576115
tree1c20dde274b370725975b1a4160e3f1f1324f6e3
parent9c97601d632b73a2edbb8b32630c20d92f5bded9
net/ipv6: Fix updates to prefix route

Sowmini reported that a recent commit broke prefix routes for linklocal
addresses. The newly added modify_prefix_route is attempting to add a
new prefix route when the ifp priority does not match the route metric
however the check needs to account for the default priority. In addition,
the route add fails because the route already exists, and then the delete
removes the one that exists. Flip the order to do the delete first.

Fixes: c8897dd908a8 ("net/ipv6: Add support for specifying metric of connected routes")
Reported-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Tested-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c