]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 May 2014 20:32:17 +0000 (16:32 -0400)
commit420f36886e5d5059b301208c1f2c7950cd04f19d
tree225d4491ce2e7bac9282a3ea9453313e2b14a61d
parentc8122e994ed241d09828c8aa9fb15baa26cbc87b
ip_tunnel: Set network header properly for IP_ECN_decapsulate()

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 7143603d0937 ("tunnel: drop packet if ECN present
with not-ECT"). It was only removed from this spot in fb37cc470b4c
("ip_tunnel: push generic protocol handling to ip_tunnel module.").

Fixes: fb37cc470b4c ("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>
net/ipv4/ip_tunnel.c