Patch "ip6_tunnel: fix ip6_tnl_lookup" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ip6_tunnel: fix ip6_tnl_lookup
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ip6_tunnel-fix-ip6_tnl_lookup.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Nov 10 16:42:45 CET 2016
From: Vadim Fedorenko <[email protected]>
Date: Tue, 11 Oct 2016 22:47:20 +0300
Subject: ip6_tunnel: fix ip6_tnl_lookup
From: Vadim Fedorenko <[email protected]>
[ Upstream commit 68d00f332e0ba7f60f212be74ede290c9f873bc5 ]
The commit ea3dc9601bda ("ip6_tunnel: Add support for wildcard tunnel endpoints.") introduces support for wildcards in tunnels endpoints, but in some rare circumstances ip6_tnl_lookup selects wrong tunnel interface relying only on source or destination address of the packet and not checking presence of wildcard in tunnels endpoints. Later in ip6_tnl_rcv this packets can be dicarded because of difference in ipproto even if fallback device have proper ipproto configuration.
This patch adds checks of wildcard endpoint in tunnel avoiding such behavior
--- net/ipv6/ip6_tunnel.c | 2 ++ 1 file changed, 2 insertions(+)
net/ipv6/ip6_tunnel.c +2 -0
@@ -246,6 +246,7 @@ ip6_tnl_lookup(struct net *net, const st hash =HASH (&any, local);for_each_ip6_tunnel_rcu (ip6n->tnls_r_l[hash]) {if (ipv6_addr_equal (local, &t->parms.laddr) && +ipv6_addr_any (&t->parms.raddr) && (t->dev->flags &IFF_UP ))return t; }
@@ -253,6 +254,7 @@ ip6_tnl_lookup(struct net *net, const st hash =HASH (remote, &any);for_each_ip6_tunnel_rcu (ip6n->tnls_r_l[hash]) {if (ipv6_addr_equal (remote, &t->parms.raddr) && +ipv6_addr_any (&t->parms.laddr) && (t->dev->flags &IFF_UP ))return t; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/ip6_tunnel-fix-ip6_tnl_lookup.patch