Skip to content
Commit e96f2e7c authored by Ying Cai's avatar Ying Cai Committed by David S. Miller
Browse files

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

Fixes: 3d7b46cd ("ip_tunnel: push generic protocol handling to ip_tunnel module.")
Reported-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarYing Cai <ycai@google.com>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 780ce3a2
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