Message ID | 1400142917-1849-1-git-send-email-timo.teras@iki.fi |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 15 May 2014 11:35:17 +0300 Timo Teräs <timo.teras@iki.fi> wrote: > The connected check fails to check for ip_gre nbma mode tunnels > properly. ip_gre creates temporary tnl_params with daddr specified > to pass-in the actual target on per-packet basis from neighbor > layer. Detect these tunnels by inspecting the actual tunnel > configuration instead. > > Fixes: 7d442fab0a67 ("ipv4: Cache dst in tunnels") > Signed-off-by: Timo Teräs <timo.teras@iki.fi> > Cc: Tom Herbert <therbert@google.com> > Cc: Eric Dumazet <edumazet@google.com> > --- > Should go to 3.14-stable too. > > (This does not fix all NBMA GRE regressions in 3.14. > I'm also getting weird oopses from GRO; will post soon more info.) > > net/ipv4/ip_tunnel.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c > index e77381d..100caf5 100644 > --- a/net/ipv4/ip_tunnel.c > +++ b/net/ipv4/ip_tunnel.c > @@ -538,9 +538,10 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct > net_device *dev, unsigned int max_headroom; /* The extra > header space needed */ __be32 dst; > int err; > - bool connected = true; > + bool connected; > > inner_iph = (const struct iphdr *)skb_inner_network_header(skb); > + connected = (tunnel->daddr != 0); > > dst = tnl_params->daddr; > if (dst == 0) { I meant tunnel->parms.iph.daddr here. tunnel->daddr does not even exist. I wonder which tree I was testing. I'll retry tests and send new patch. -- 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
From: Timo Teräs <timo.teras@iki.fi> Date: Thu, 15 May 2014 11:35:17 +0300 > The connected check fails to check for ip_gre nbma mode tunnels > properly. ip_gre creates temporary tnl_params with daddr specified > to pass-in the actual target on per-packet basis from neighbor > layer. Detect these tunnels by inspecting the actual tunnel > configuration instead. > > Fixes: 7d442fab0a67 ("ipv4: Cache dst in tunnels") > Signed-off-by: Timo Teräs <timo.teras@iki.fi> > Cc: Tom Herbert <therbert@google.com> > Cc: Eric Dumazet <edumazet@google.com> > --- > Should go to 3.14-stable too. Good catch. Applied and queued up for -stable, thank you. -- 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
From: Timo Teras <timo.teras@iki.fi> Date: Thu, 15 May 2014 20:35:35 +0300 > I meant tunnel->parms.iph.daddr here. tunnel->daddr does not even > exist. I wonder which tree I was testing. I'll retry tests and send new > patch. Oops, let me know when you have this ready :-/ -- 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/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index e77381d..100caf5 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -538,9 +538,10 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, unsigned int max_headroom; /* The extra header space needed */ __be32 dst; int err; - bool connected = true; + bool connected; inner_iph = (const struct iphdr *)skb_inner_network_header(skb); + connected = (tunnel->daddr != 0); dst = tnl_params->daddr; if (dst == 0) {
The connected check fails to check for ip_gre nbma mode tunnels properly. ip_gre creates temporary tnl_params with daddr specified to pass-in the actual target on per-packet basis from neighbor layer. Detect these tunnels by inspecting the actual tunnel configuration instead. Fixes: 7d442fab0a67 ("ipv4: Cache dst in tunnels") Signed-off-by: Timo Teräs <timo.teras@iki.fi> Cc: Tom Herbert <therbert@google.com> Cc: Eric Dumazet <edumazet@google.com> --- Should go to 3.14-stable too. (This does not fix all NBMA GRE regressions in 3.14. I'm also getting weird oopses from GRO; will post soon more info.) net/ipv4/ip_tunnel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)