Skip to content
Snippets Groups Projects
Commit b045d37b authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

ip_tunnel: fix panic in ip_tunnel_xmit()


Setting rt variable to NULL at the beginning of ip_tunnel_xmit()
missed possible use of this variable as a scratch value.

Also fixes a possible dst leak in tunnel_dst_check() :
If we had to call tunnel_dst_reset(), we forgot to
release the reference on dst.

Merges tunnel_dst_get()/tunnel_dst_check() into
a single tunnel_rtable_get() function for clarity.

Many thanks to Tommi for his report and tests.

Fixes: 7d442fab ("ipv4: Cache dst in tunnels")
Reported-by: default avatarTommi Rantala <tt.rantala@gmail.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Tested-by: default avatarTommi Rantala <tt.rantala@gmail.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4fe46b9a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment