From: William Dauchy <w.dauchy@criteo.com>
To: netdev@vger.kernel.org
Cc: William Dauchy <w.dauchy@criteo.com>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
pshelar@nicira.com
Subject: [PATCH net] net, ip_tunnel: fix interface lookup with no key
Date: Wed, 25 Mar 2020 16:03:04 +0100 [thread overview]
Message-ID: <20200325150304.5506-1-w.dauchy@criteo.com> (raw)
when creating a new ipip interface with no local/remote configuration,
the lookup is done with TUNNEL_NO_KEY flag, making it impossible to
match the new interface (only possible match being fallback or metada
case interface); e.g: `ip link add tunl1 type ipip dev eth0`
If we consider `key` being zero in ipip case, we might consider ok to
go through this last loop, and make it possible to match such interface.
In fact this is what is done when we create a gre interface without key
and local/remote.
context being on my side, I'm creating an extra ipip interface attached
to the physical one, and moving it to a dedicated namespace.
Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Signed-off-by: William Dauchy <w.dauchy@criteo.com>
---
net/ipv4/ip_tunnel.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 74e1d964a615..f6578bcadbed 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -142,9 +142,6 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,
cand = t;
}
- if (flags & TUNNEL_NO_KEY)
- goto skip_key_lookup;
-
hlist_for_each_entry_rcu(t, head, hash_node) {
if (t->parms.i_key != key ||
t->parms.iph.saddr != 0 ||
--
2.25.1
next reply other threads:[~2020-03-25 15:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 15:03 William Dauchy [this message]
2020-03-25 15:22 ` [PATCH net] net, ip_tunnel: fix interface lookup with no key William Dauchy
2020-03-26 6:00 ` kbuild test robot
2020-03-26 18:01 ` Nicolas Dichtel
2020-03-26 18:56 ` William Dauchy
2020-03-27 7:30 ` Nicolas Dichtel
2020-03-27 14:54 ` [PATCH v2 " William Dauchy
2020-03-27 18:15 ` Nicolas Dichtel
2020-03-27 18:56 ` [PATCH v3 " William Dauchy
2020-03-27 22:29 ` Nicolas Dichtel
2020-03-30 5:21 ` 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=20200325150304.5506-1-w.dauchy@criteo.com \
--to=w.dauchy@criteo.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pshelar@nicira.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.