]> git.ipfire.org Git - people/ms/linux.git/commit
ip_tunnel: Set network header properly for IP_ECN_decapsulate()
authorYing Cai <ycai@google.com>
Sun, 4 May 2014 22:20:04 +0000 (15:20 -0700)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 May 2014 09:49:27 +0000 (11:49 +0200)
commit90ca7e93604cfb1f11c2ebf8faf476b3b0ea2e1f
treeddfb21fde7c4f4f039b7588a27671d9e957cd419
parent368986ee10b1739f9c2a400ac0fca0779c8fdc7e
ip_tunnel: Set network header properly for IP_ECN_decapsulate()

[ Upstream commit e96f2e7c430014eff52c93cabef1ad4f42ed0db1 ]

In ip_tunnel_rcv(), set skb->network_header to inner IP header
before IP_ECN_decapsulate().

Without the fix, IP_ECN_decapsulate() takes outer IP header as
inner IP header, possibly causing error messages or packet drops.

Note that this skb_reset_network_header() call was in this spot when
the original feature for checking consistency of ECN bits through
tunnels was added in eccc1bb8d4b4 ("tunnel: drop packet if ECN present
with not-ECT"). It was only removed from this spot in 3d7b46cd20e3
("ip_tunnel: push generic protocol handling to ip_tunnel module.").

Fixes: 3d7b46cd20e3 ("ip_tunnel: push generic protocol handling to ip_tunnel module.")
Reported-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Ying Cai <ycai@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/ipv4/ip_tunnel.c