mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
net: vrf: Flip IPv6 output path from FIB lookup hook to out hook
Flip the IPv6 output path to use the l3mdev tx out hook. The VRF dst is not returned on the first FIB lookup. Instead, the dst on the skb is switched at the beginning of the IPv6 output processing to send the packet to the VRF driver on xmit. Link scope addresses (linklocal and multicast) need special handling: specifically the oif the flow struct can not be changed because we want the lookup tied to the enslaved interface. ie., the source address and the returned route MUST point to the interface scope passed in. Convert the existing vrf_get_rt6_dst to handle only link scope addresses. Signed-off-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ebfc102c56
commit
4c1feac58e
4 changed files with 100 additions and 58 deletions
|
|
@ -1188,12 +1188,15 @@ static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table
|
|||
struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk,
|
||||
struct flowi6 *fl6, int flags)
|
||||
{
|
||||
struct dst_entry *dst;
|
||||
bool any_src;
|
||||
|
||||
dst = l3mdev_get_rt6_dst(net, fl6);
|
||||
if (dst)
|
||||
return dst;
|
||||
if (rt6_need_strict(&fl6->daddr)) {
|
||||
struct dst_entry *dst;
|
||||
|
||||
dst = l3mdev_link_scope_lookup(net, fl6);
|
||||
if (dst)
|
||||
return dst;
|
||||
}
|
||||
|
||||
fl6->flowi6_iif = LOOPBACK_IFINDEX;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue