diff options
| author | Eric Dumazet <edumazet@google.com> | 2017-02-03 14:29:42 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-08-20 13:24:08 +0200 |
| commit | c8d5029cb6cfffe5030ce044ce0d639431a6bd93 (patch) | |
| tree | 806bd34adab18a4efc68c9fa4057332bbe8d6606 /net/core/dev.c | |
| parent | 0f8657691e1a07f07231a209d2fdaadb73788dc6 (diff) | |
net: skb_needs_check() accepts CHECKSUM_NONE for tx
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: b2504a5dbef3 ("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>
Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 942f73403..5a33b1daf 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2346,9 +2346,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; } /** |
