]> git.baikalelectronics.ru Git - kernel.git/commit
ip6_tunnel: fix GRE6 segmentation
authorJakub Kicinski <kuba@kernel.org>
Tue, 22 Jun 2021 01:52:54 +0000 (18:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jun 2021 17:30:05 +0000 (10:30 -0700)
commit13df30a00420a684a13091c0946981ce5493e8c4
tree3be3e04a4f44653335525afbec08706d0aaf49c1
parente98e7b0273caf00b092e0c6af3cf9c6fc079759c
ip6_tunnel: fix GRE6 segmentation

Commit 2f7a3291d1ea ("ip6_tunnel: add MPLS transmit support")
moved assiging inner_ipproto down from ipxip6_tnl_xmit() to
its callee ip6_tnl_xmit(). The latter is also used by GRE.

Since commit d2ff325d9549 ("gre: Use inner_proto to obtain inner
header protocol") GRE had been depending on skb->inner_protocol
during segmentation. It sets it in gre_build_header() and reads
it in gre_gso_segment(). Changes to ip6_tnl_xmit() overwrite
the protocol, resulting in GSO skbs getting dropped.

Note that inner_protocol is a union with inner_ipproto,
GRE uses the former while the change switched it to the latter
(always setting it to just IPPROTO_GRE).

Restore the original location of skb_set_inner_ipproto(),
it is unclear why it was moved in the first place.

Fixes: 2f7a3291d1ea ("ip6_tunnel: add MPLS transmit support")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Tested-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_tunnel.c