net: vrf: Implement get_saddr for IPv6
authorDavid Ahern <dsa@cumulusnetworks.com>
Thu, 16 Jun 2016 23:24:25 +0000 (16:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jun 2016 04:25:29 +0000 (21:25 -0700)
commit0d240e7811c4ec1965760ee4643b5bbc9cfacbb3
tree8bdf0d3d57832b40568424b1d03bbc0cd51f39a1
parenta2e2ff560f5113e8ca31432fbd985f5f1889efdc
net: vrf: Implement get_saddr for IPv6

IPv6 source address selection needs to consider the real egress route.
Similar to IPv4 implement a get_saddr6 method which is called if
source address has not been set.  The get_saddr6 method does a full
lookup which means pulling a route from the VRF FIB table and properly
considering linklocal/multicast destination addresses. Lookup failures
(eg., unreachable) then cause the source address selection to fail
which gets propagated back to the caller.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vrf.c
include/net/l3mdev.h
net/ipv6/ip6_output.c
net/l3mdev/l3mdev.c