Commit 6e28b000 authored by David Ahern's avatar David Ahern Committed by David S. Miller

net: Fix vti use case with oif in dst lookups for IPv6

It occurred to me yesterday that 741a11d9 ("net: ipv6: Add
RT6_LOOKUP_F_IFACE flag if oif is set") means that xfrm6_dst_lookup
needs the FLOWI_FLAG_SKIP_NH_OIF flag set. This latest commit causes
the oif to be considered in lookups which is known to break vti. This
explains why 58189ca7 did not the IPv6 change at the time it was
submitted.

Fixes: 42a7b32b ("xfrm: Add oif to dst lookups")
Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90d2c056
...@@ -37,6 +37,7 @@ static struct dst_entry *xfrm6_dst_lookup(struct net *net, int tos, int oif, ...@@ -37,6 +37,7 @@ static struct dst_entry *xfrm6_dst_lookup(struct net *net, int tos, int oif,
memset(&fl6, 0, sizeof(fl6)); memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_oif = oif; fl6.flowi6_oif = oif;
fl6.flowi6_flags = FLOWI_FLAG_SKIP_NH_OIF;
memcpy(&fl6.daddr, daddr, sizeof(fl6.daddr)); memcpy(&fl6.daddr, daddr, sizeof(fl6.daddr));
if (saddr) if (saddr)
memcpy(&fl6.saddr, saddr, sizeof(fl6.saddr)); memcpy(&fl6.saddr, saddr, sizeof(fl6.saddr));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment