net: Move skb_has_shared_frag check out of GRE code and into segmentation
The call skb_has_shared_frag is used in the GRE path and skb_checksum_help to verify that no frags can be modified by an external entity. This check really doesn't belong in the GRE path but in the skb_segment function itself. This way any protocol that might be segmented will be performing this check before attempting to offload a checksum to software. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
08b64fcca9
commit
ddff00d420
@@ -3173,6 +3173,11 @@ skip_fraglist:
|
||||
|
||||
perform_csum_check:
|
||||
if (!csum) {
|
||||
if (skb_has_shared_frag(nskb)) {
|
||||
err = __skb_linearize(nskb);
|
||||
if (err)
|
||||
goto err;
|
||||
}
|
||||
if (!nskb->remcsum_offload)
|
||||
nskb->ip_summed = CHECKSUM_NONE;
|
||||
SKB_GSO_CB(nskb)->csum =
|
||||
|
Reference in New Issue
Block a user