summaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2020-07-03 16:57:09 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2020-07-07 08:19:46 +0200
commit17175d1a27c618e214555b91eca8a0be4cf07f45 (patch)
treee59787c4d3b5ff06dda4f562cc5d0530b71cc26c /net/xfrm/xfrm_policy.c
parent4f47e8ab6ab796b5380f74866fa5287aca4dcc58 (diff)
xfrm: esp6: fix encapsulation header offset computation
In commit 0146dca70b87, I incorrectly adapted the code that computes the location of the UDP or TCP encapsulation header from IPv4 to IPv6. In esp6_input_done2, skb->transport_header points to the ESP header, so by adding skb_network_header_len, uh and th will point to the ESP header, not the encapsulation header that's in front of it. Since the TCP header's size can change with options, we have to start from the IPv6 header and walk past possible extensions. Fixes: 0146dca70b87 ("xfrm: add support for UDPv6 encapsulation of ESP") Fixes: 26333c37fc28 ("xfrm: add IPv6 support for espintcp") Reported-by: Tobias Brunner <tobias@strongswan.org> Tested-by: Tobias Brunner <tobias@strongswan.org> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
0 files changed, 0 insertions, 0 deletions