summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDmitry Popov <ixaphire@qrator.net>2014-07-29 03:07:52 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-14 09:38:23 +0800
commitec7e72757898d577df4667baa7dd1c7781d0fa9b (patch)
tree9183c6995ac5a5bf12df9e8d15de20992749a13e /include
parent3c9d360016a04e00ccbbba02a1845eac49567e97 (diff)
downloadlinux-stable-ec7e72757898d577df4667baa7dd1c7781d0fa9b.tar.gz
linux-stable-ec7e72757898d577df4667baa7dd1c7781d0fa9b.tar.bz2
linux-stable-ec7e72757898d577df4667baa7dd1c7781d0fa9b.zip
ip_tunnel(ipv4): fix tunnels with "local any remote $remote_ip"
[ Upstream commit 95cb5745983c222867cc9ac593aebb2ad67d72c0 ] Ipv4 tunnels created with "local any remote $ip" didn't work properly since 7d442fab0 (ipv4: Cache dst in tunnels). 99% of packets sent via those tunnels had src addr = 0.0.0.0. That was because only dst_entry was cached, although fl4.saddr has to be cached too. Every time ip_tunnel_xmit used cached dst_entry (tunnel_rtable_get returned non-NULL), fl4.saddr was initialized with tnl_params->saddr (= 0 in our case), and wasn't changed until iptunnel_xmit(). This patch adds saddr to ip_tunnel->dst_cache, fixing this issue. Reported-by: Sergey Popov <pinkbyte@gentoo.org> Signed-off-by: Dmitry Popov <ixaphire@qrator.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip_tunnels.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index e77c10405d51..7b9ec5837496 100644
--- a/include/net/ip_tunnels.h
+++ b/include/net/ip_tunnels.h
@@ -40,6 +40,7 @@ struct ip_tunnel_prl_entry {
struct ip_tunnel_dst {
struct dst_entry __rcu *dst;
+ __be32 saddr;
};
struct ip_tunnel {