Skip to content

Commit

Permalink
net: skb_needs_check() accepts CHECKSUM_NONE for tx
Browse files Browse the repository at this point in the history
My recent change missed fact that UFO would perform a complete
UDP checksum before segmenting in frags.

In this case skb->ip_summed is set to CHECKSUM_NONE.

We need to add this valid case to skb_needs_check()

Fixes: b2504a5 ("net: reduce skb_warn_bad_offload() noise")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 3, 2017
1 parent 79e7fff commit 6e7bc47
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2637,9 +2637,10 @@ EXPORT_SYMBOL(skb_mac_gso_segment);
static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
{
if (tx_path)
return skb->ip_summed != CHECKSUM_PARTIAL;
else
return skb->ip_summed == CHECKSUM_NONE;
return skb->ip_summed != CHECKSUM_PARTIAL &&
skb->ip_summed != CHECKSUM_NONE;

return skb->ip_summed == CHECKSUM_NONE;
}

/**
Expand Down

0 comments on commit 6e7bc47

Please sign in to comment.