Message ID | 4C0008C7.7020302@hp.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Brian Haley <brian.haley@hp.com> Date: Fri, 28 May 2010 14:17:43 -0400 > Commit f4f914b5 (net: ipv6 bind to device issue) caused > a regression with Mobile IPv6 when it changed the meaning > of fl->oif to become a strict requirement of the route > lookup. Instead, only force strict mode when > sk->sk_bound_dev_if is set on the calling socket, getting > the intended behavior and fixing the regression. > > Tested-by: Arnaud Ebalard <arno@natisbad.org> > Signed-off-by: Brian Haley <brian.haley@hp.com> Applied, and queued for -stable, thanks for fixing this. -- 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
On Fri, May 28, 2010 at 02:17:43PM -0400, Brian Haley wrote: > Commit f4f914b5 (net: ipv6 bind to device issue) caused > a regression with Mobile IPv6 when it changed the meaning > of fl->oif to become a strict requirement of the route > lookup. Instead, only force strict mode when > sk->sk_bound_dev_if is set on the calling socket, getting > the intended behavior and fixing the regression. > > Tested-by: Arnaud Ebalard <arno@natisbad.org> > Signed-off-by: Brian Haley <brian.haley@hp.com> > > 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)) hi, sorry for the late reply, I was out last week.. the change looks ok, I'll verify it with the reproducer I used for the last fix thanks, jirka -- 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
On Mon, May 31, 2010 at 10:46:20AM +0200, Jiri Olsa wrote: > On Fri, May 28, 2010 at 02:17:43PM -0400, Brian Haley wrote: > > Commit f4f914b5 (net: ipv6 bind to device issue) caused > > a regression with Mobile IPv6 when it changed the meaning > > of fl->oif to become a strict requirement of the route > > lookup. Instead, only force strict mode when > > sk->sk_bound_dev_if is set on the calling socket, getting > > the intended behavior and fixing the regression. > > > > Tested-by: Arnaud Ebalard <arno@natisbad.org> > > Signed-off-by: Brian Haley <brian.haley@hp.com> > > > > 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)) > hi, > > sorry for the late reply, I was out last week.. > > the change looks ok, I'll verify it with the reproducer > I used for the last fix > > thanks, > jirka it passed the test for me, so it looks fine jirka -- 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
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))