Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Brian Haley
Date: Thursday, May 27, 2010 - 12:39 pm

Hi Arnoud,

On 05/27/2010 11:14 AM, Arnaud Ebalard wrote:

Thanks for all the analysis, comments below.


Ok, so it's not un-initialized data causing this.


Ok, so the call to ip6_route_output() was from the tunnel code, which is
using it's cached flowi, which has oif set to the tunnel.  The XFRM code
swaps the addresses, which should invalidate the oif, but it doesn't.


The problem is we assumed the caller's would only set fl->oif if they
wanted it enforced (multicast, link-local, SO_BINDTODEVICE), but it
didn't take into account the tunnel code.  I guess the easy answer
would be to revert this until we can fix it correctly.


I guess I always believed setting SO_BINDTODEVICE should always force
traffic out that interface, but from Yoshifuji's email it seems that
maybe wasn't the intention, at least for things that don't meet
the rt_need_strict() criteria like globals.  I don't know the history
behind the setsockopt.

The below might actually be what was actually intended, triggering
on what the user forced, rather than assuming all callers require
strict behavior.

-Brian


diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 294cbe8..252d761 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -814,7 +814,7 @@ struct dst_entry * ip6_route_output(struct net *net, struct sock *sk,
 {
 	int flags = 0;
 
-	if (fl->oif || rt6_need_strict(&fl->fl6_dst))
+	if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl->fl6_dst))
 		flags |= RT6_LOOKUP_F_IFACE;
 
 	if (!ipv6_addr_any(&fl->fl6_src))
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0, Arnaud Ebalard, (Wed May 26, 10:01 am)
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b5 ..., YOSHIFUJI Hideaki, (Thu May 27, 10:39 am)
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b5 ..., Brian Haley, (Thu May 27, 12:39 pm)
[PATCH] IPv6: fix Mobile IPv6 regression, Brian Haley, (Fri May 28, 11:17 am)
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b5 ..., YOSHIFUJI Hideaki, (Fri May 28, 11:40 am)
Re: [PATCH] IPv6: fix Mobile IPv6 regression, David Miller, (Fri May 28, 11:03 pm)
Re: [PATCH] IPv6: fix Mobile IPv6 regression, Jiri Olsa, (Mon May 31, 1:46 am)
Re: [PATCH] IPv6: fix Mobile IPv6 regression, Jiri Olsa, (Mon May 31, 5:49 am)