* [PATCH] net: Really fix vti6 with oif in dst lookups
@ 2015-10-19 15:26 David Ahern
2015-10-20 11:01 ` Steffen Klassert
2015-10-22 2:05 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: David Ahern @ 2015-10-19 15:26 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, David Ahern
6e28b000825d ("net: Fix vti use case with oif in dst lookups for IPv6")
is missing the checks on FLOWI_FLAG_SKIP_NH_OIF. Add them.
Fixes: 42a7b32b73d6 ("xfrm: Add oif to dst lookups")
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
This is needed for net in 4.3. 6e28b000825d was mistakenly created on
top of the VRF patches which had this change. Steffen has confirmed
VTI6 works with this change.
net/ipv6/ip6_output.c | 3 ++-
net/ipv6/route.c | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 61d403ee1031..d03d6da772f3 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -877,7 +877,8 @@ static struct dst_entry *ip6_sk_dst_check(struct sock *sk,
#ifdef CONFIG_IPV6_SUBTREES
ip6_rt_check(&rt->rt6i_src, &fl6->saddr, np->saddr_cache) ||
#endif
- (fl6->flowi6_oif && fl6->flowi6_oif != dst->dev->ifindex)) {
+ (!(fl6->flowi6_flags & FLOWI_FLAG_SKIP_NH_OIF) &&
+ (fl6->flowi6_oif && fl6->flowi6_oif != dst->dev->ifindex))) {
dst_release(dst);
dst = NULL;
}
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 968f31c01f89..be5d2879b5d8 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1068,6 +1068,9 @@ static struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
saved_fn = fn;
+ if (fl6->flowi6_flags & FLOWI_FLAG_SKIP_NH_OIF)
+ oif = 0;
+
redo_rt6_select:
rt = rt6_select(fn, oif, strict);
if (rt->rt6i_nsiblings)
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: Really fix vti6 with oif in dst lookups
2015-10-19 15:26 [PATCH] net: Really fix vti6 with oif in dst lookups David Ahern
@ 2015-10-20 11:01 ` Steffen Klassert
2015-10-22 2:05 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2015-10-20 11:01 UTC (permalink / raw)
To: David Ahern; +Cc: netdev
On Mon, Oct 19, 2015 at 08:26:05AM -0700, David Ahern wrote:
> 6e28b000825d ("net: Fix vti use case with oif in dst lookups for IPv6")
> is missing the checks on FLOWI_FLAG_SKIP_NH_OIF. Add them.
>
> Fixes: 42a7b32b73d6 ("xfrm: Add oif to dst lookups")
> Cc: Steffen Klassert <steffen.klassert@secunet.com>
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
> ---
> This is needed for net in 4.3. 6e28b000825d was mistakenly created on
> top of the VRF patches which had this change. Steffen has confirmed
> VTI6 works with this change.
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: Really fix vti6 with oif in dst lookups
2015-10-19 15:26 [PATCH] net: Really fix vti6 with oif in dst lookups David Ahern
2015-10-20 11:01 ` Steffen Klassert
@ 2015-10-22 2:05 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-10-22 2:05 UTC (permalink / raw)
To: dsa; +Cc: netdev, steffen.klassert
From: David Ahern <dsa@cumulusnetworks.com>
Date: Mon, 19 Oct 2015 08:26:05 -0700
> 6e28b000825d ("net: Fix vti use case with oif in dst lookups for IPv6")
> is missing the checks on FLOWI_FLAG_SKIP_NH_OIF. Add them.
>
> Fixes: 42a7b32b73d6 ("xfrm: Add oif to dst lookups")
> Cc: Steffen Klassert <steffen.klassert@secunet.com>
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-22 1:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 15:26 [PATCH] net: Really fix vti6 with oif in dst lookups David Ahern
2015-10-20 11:01 ` Steffen Klassert
2015-10-22 2:05 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).