diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2022-03-07 13:11:40 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-16 14:26:42 +0100 |
commit | 9a6e4c5d7edf2b8c1a97ae2c5dfe106b0366f02c (patch) | |
tree | 3c8f80d4a5b5fe546bd5fed71a9f42d167ab9b09 | |
parent | 9afe83f62aac348db1facb28bfc106109a06e44d (diff) | |
download | linux-stable-9a6e4c5d7edf2b8c1a97ae2c5dfe106b0366f02c.tar.gz linux-stable-9a6e4c5d7edf2b8c1a97ae2c5dfe106b0366f02c.tar.bz2 linux-stable-9a6e4c5d7edf2b8c1a97ae2c5dfe106b0366f02c.zip |
esp: Fix BEET mode inter address family tunneling on GSO
[ Upstream commit 053c8fdf2c930efdff5496960842bbb5c34ad43a ]
The xfrm{4,6}_beet_gso_segment() functions did not correctly set the
SKB_GSO_IPXIP4 and SKB_GSO_IPXIP6 gso types for the address family
tunneling case. Fix this by setting these gso types.
Fixes: 384a46ea7bdc7 ("esp4: add gso_segment for esp4 beet mode")
Fixes: 7f9e40eb18a99 ("esp6: add gso_segment for esp6 beet mode")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/ipv4/esp4_offload.c | 3 | ||||
-rw-r--r-- | net/ipv6/esp6_offload.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/esp4_offload.c b/net/ipv4/esp4_offload.c index 8e4e9aa12130..dad5d29a6a8d 100644 --- a/net/ipv4/esp4_offload.c +++ b/net/ipv4/esp4_offload.c @@ -159,6 +159,9 @@ static struct sk_buff *xfrm4_beet_gso_segment(struct xfrm_state *x, skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV4; } + if (proto == IPPROTO_IPV6) + skb_shinfo(skb)->gso_type |= SKB_GSO_IPXIP4; + __skb_pull(skb, skb_transport_offset(skb)); ops = rcu_dereference(inet_offloads[proto]); if (likely(ops && ops->callbacks.gso_segment)) diff --git a/net/ipv6/esp6_offload.c b/net/ipv6/esp6_offload.c index a349d4798077..302170882382 100644 --- a/net/ipv6/esp6_offload.c +++ b/net/ipv6/esp6_offload.c @@ -198,6 +198,9 @@ static struct sk_buff *xfrm6_beet_gso_segment(struct xfrm_state *x, ipv6_skip_exthdr(skb, 0, &proto, &frag); } + if (proto == IPPROTO_IPIP) + skb_shinfo(skb)->gso_type |= SKB_GSO_IPXIP6; + __skb_pull(skb, skb_transport_offset(skb)); ops = rcu_dereference(inet6_offloads[proto]); if (likely(ops && ops->callbacks.gso_segment)) |