Skip to content
Commit 95cb5745 authored by Dmitry Popov's avatar Dmitry Popov Committed by David S. Miller
Browse files

ip_tunnel(ipv4): fix tunnels with "local any remote $remote_ip"

Ipv4 tunnels created with "local any remote $ip" didn't work properly since
7d442fab

 (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: default avatarSergey Popov <pinkbyte@gentoo.org>
Signed-off-by: default avatarDmitry Popov <ixaphire@qrator.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dabf24d1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment