]> git.baikalelectronics.ru Git - kernel.git/commit
tcp6: don't move IP6CB before xfrm6_policy_check()
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 22 Dec 2014 17:22:48 +0000 (18:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Dec 2014 21:48:01 +0000 (16:48 -0500)
commit04d46db176c78a3e20664b180d3f296bfd7e0ccc
tree888c8e5c7d12add3684c02010d1ef3902a35a4f5
parent63980f5cbf4a8ca393a90591bdb198e4c0c72c14
tcp6: don't move IP6CB before xfrm6_policy_check()

When xfrm6_policy_check() is used, _decode_session6() is called after some
intermediate functions. This function uses IP6CB(), thus TCP_SKB_CB() must be
prepared after the call of xfrm6_policy_check().

Before this patch, scenarii with IPv6 + TCP + IPsec Transport are broken.

Fixes: 06c9029f9882 ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
Reported-by: Huaibin Wang <huaibin.wang@6wind.com>
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/tcp_ipv6.c