]> git.itanic.dy.fi Git - linux-stable/commit
esp4: Fix udpencap for local TCP packets.
authorSteffen Klassert <steffen.klassert@secunet.com>
Fri, 9 Jun 2017 09:35:46 +0000 (11:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:41:43 +0000 (14:41 +0200)
commita5afcf8553e94d3002e1fbfeda82046dbfeb87e6
treec6bc84963bdba0f67ccebcf245fbbfb22ac93148
parentb9a1254c31cc63d1f30fa37b782ebab70e9f0665
esp4: Fix udpencap for local TCP packets.

[ Upstream commit 0e78a87306a6f55b1c7bbafad1de62c3975953ca ]

Locally generated TCP packets are usually cloned, so we
do skb_cow_data() on this packets. After that we need to
reload the pointer to the esp header. On udpencap this
header has an offset to skb_transport_header, so take this
offset into account.

This is a backport of:
commit 0e78a87306a ("esp4: Fix udpencap for local TCP packets.")

Fixes: 67d349ed603 ("net/esp4: Fix invalid esph pointer crash")
Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output")
Reported-by: Don Bowman <db@donbowman.ca>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/esp4.c