mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
esp: check the NETIF_F_HW_ESP_TX_CSUM bit before segmenting
If I understand correctly, we should not be asking for a checksum offload on an ipsec packet if the netdev isn't advertising NETIF_F_HW_ESP_TX_CSUM. In that case, we should clear the NETIF_F_CSUM_MASK bits. Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
f8c3d0dda4
commit
5211fcfb81
2 changed files with 4 additions and 0 deletions
|
@ -138,6 +138,8 @@ static struct sk_buff *esp4_gso_segment(struct sk_buff *skb,
|
|||
if (!(features & NETIF_F_HW_ESP) || !x->xso.offload_handle ||
|
||||
(x->xso.dev != skb->dev))
|
||||
esp_features = features & ~(NETIF_F_SG | NETIF_F_CSUM_MASK);
|
||||
else if (!(features & NETIF_F_HW_ESP_TX_CSUM))
|
||||
esp_features = features & ~NETIF_F_CSUM_MASK;
|
||||
|
||||
xo->flags |= XFRM_GSO_SEGMENT;
|
||||
|
||||
|
|
|
@ -165,6 +165,8 @@ static struct sk_buff *esp6_gso_segment(struct sk_buff *skb,
|
|||
if (!(features & NETIF_F_HW_ESP) || !x->xso.offload_handle ||
|
||||
(x->xso.dev != skb->dev))
|
||||
esp_features = features & ~(NETIF_F_SG | NETIF_F_CSUM_MASK);
|
||||
else if (!(features & NETIF_F_HW_ESP_TX_CSUM))
|
||||
esp_features = features & ~NETIF_F_CSUM_MASK;
|
||||
|
||||
xo->flags |= XFRM_GSO_SEGMENT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue