mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
esp: Fix BEET mode inter address family tunneling on GSO
[ Upstream commit053c8fdf2c] 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:384a46ea7b("esp4: add gso_segment for esp4 beet mode") Fixes:7f9e40eb18("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
16386479ef
commit
5bee2ed050
@@ -160,6 +160,9 @@ static struct sk_buff *xfrm4_beet_gso_segment(struct xfrm_state *x,
|
|||||||
skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV4;
|
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));
|
__skb_pull(skb, skb_transport_offset(skb));
|
||||||
ops = rcu_dereference(inet_offloads[proto]);
|
ops = rcu_dereference(inet_offloads[proto]);
|
||||||
if (likely(ops && ops->callbacks.gso_segment))
|
if (likely(ops && ops->callbacks.gso_segment))
|
||||||
|
|||||||
@@ -198,6 +198,9 @@ static struct sk_buff *xfrm6_beet_gso_segment(struct xfrm_state *x,
|
|||||||
ipv6_skip_exthdr(skb, 0, &proto, &frag);
|
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));
|
__skb_pull(skb, skb_transport_offset(skb));
|
||||||
ops = rcu_dereference(inet6_offloads[proto]);
|
ops = rcu_dereference(inet6_offloads[proto]);
|
||||||
if (likely(ops && ops->callbacks.gso_segment))
|
if (likely(ops && ops->callbacks.gso_segment))
|
||||||
|
|||||||
Reference in New Issue
Block a user