netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Timo Teräs" <timo.teras@iki.fi>
To: netdev@vger.kernel.org
Cc: "Timo Teräs" <timo.teras@iki.fi>,
	"Tom Herbert" <therbert@google.com>,
	"Eric Dumazet" <edumazet@google.com>
Subject: [PATCH] ipv4: ip_tunnels: disable dst cache for nbma gre tunnels
Date: Thu, 15 May 2014 11:35:17 +0300	[thread overview]
Message-ID: <1400142917-1849-1-git-send-email-timo.teras@iki.fi> (raw)
In-Reply-To: <20140424151647.2a917ff1@vostro>

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) {
-- 
1.9.3

  reply	other threads:[~2014-05-15  8:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02 19:48 [PATCH 1/2 v3] ipv4: Cache dst in tunnels Tom Herbert
2014-04-24 12:16 ` [1/2,v3] " Timo Teras
2014-05-15  8:35   ` Timo Teräs [this message]
2014-05-15 17:35     ` [PATCH] ipv4: ip_tunnels: disable dst cache for nbma gre tunnels Timo Teras
2014-05-16  3:29       ` David Miller
2014-05-16  5:34         ` [PATCH net,v2] ipv4: ip_tunnels: disable " Timo Teräs
2014-05-16 20:59           ` David Miller
2014-05-16  3:28     ` [PATCH] ipv4: ip_tunnels: disable dst " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400142917-1849-1-git-send-email-timo.teras@iki.fi \
    --to=timo.teras@iki.fi \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).