]> git.baikalelectronics.ru Git - kernel.git/commit
net: WARN if skb_checksum_help() is called on skb requiring segmentation
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 17 Jan 2012 07:57:56 +0000 (07:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Jan 2012 20:49:03 +0000 (15:49 -0500)
commit3092dd95d0cd8ae55527f1c62d9aaf2c451d1238
tree6e847f5256b6ef429ca1a8ea85ede022d0c53cbe
parent05ba6531e036a953d0307b3d6fef188003ae194d
net: WARN if skb_checksum_help() is called on skb requiring segmentation

skb_checksum_help() has never done anything useful with skbs that
require segmentation.  Setting skb->ip_summed = CHECKSUM_NONE makes
them invalid and provokes a later WARNing in skb_gso_segment().

Passing such an skb to skb_checksum_help() indicates a bug, so we
should warn about it immediately.  Move the warning from
skb_gso_segment() into a shared function, and add gso_type and
gso_size to it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c