]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv6: Fix processing of RAs in presence of VRF
authorDavid Ahern <dsa@cumulusnetworks.com>
Mon, 24 Oct 2016 17:52:35 +0000 (10:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Oct 2016 20:30:52 +0000 (16:30 -0400)
commit889bff7e1ba5f7231aaf48a12a9ce582b6e86cd8
treee429decf1a5d248d9a080c09acc1f8b9a02e57c0
parent6c55dec08c6ecd0026c068bc804b608ac693bac8
net: ipv6: Fix processing of RAs in presence of VRF

rt6_add_route_info and rt6_add_dflt_router were updated to pull the FIB
table from the device index, but the corresponding rt6_get_route_info
and rt6_get_dflt_router functions were not leading to the failure to
process RA's:

    ICMPv6: RA: ndisc_router_discovery failed to add default route

Fix the 'get' functions by using the table id associated with the
device when applicable.

Also, now that default routes can be added to tables other than the
default table, rt6_purge_dflt_routers needs to be updated as well to
look at all tables. To handle that efficiently, add a flag to the table
denoting if it is has a default route via RA.

Fixes: 4a62c55aed661 ("net: Add VRF support to IPv6 stack")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_fib.h
net/ipv6/route.c