]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: Fix IPsec pre-encap fragmentation check
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 4 Sep 2015 05:21:06 +0000 (13:21 +0800)
committerZefan Li <lizefan@huawei.com>
Wed, 27 Apr 2016 10:55:20 +0000 (18:55 +0800)
commit244e0dbc02ee3af070bd100a840bd112b769e35a
tree4ec57d10824d8ae401272aa485ad0742dd4bf7f9
parentd8776fffaeff0ae3ecf78b33515f1a8624f78ace
ipv6: Fix IPsec pre-encap fragmentation check

commit 93efac3f2e03321129de67a3c0ba53048bb53e31 upstream.

The IPv6 IPsec pre-encap path performs fragmentation for tunnel-mode
packets.  That is, we perform fragmentation pre-encap rather than
post-encap.

A check was added later to ensure that proper MTU information is
passed back for locally generated traffic.  Unfortunately this
check was performed on all IPsec packets, including transport-mode
packets.

What's more, the check failed to take GSO into account.

The end result is that transport-mode GSO packets get dropped at
the check.

This patch fixes it by moving the tunnel mode check forward as well
as adding the GSO check.

Fixes: dd767856a36e ("xfrm6: Don't call icmpv6_send on local error")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
[lizf: Backported to 3.4:
 - adjust context
 - s/ignore_df/local_df]
Signed-off-by: Zefan Li <lizefan@huawei.com>
net/ipv6/xfrm6_output.c