net: Clarify meaning of CHECKSUM_PARTIAL for receive path
authorTom Herbert <therbert@google.com>
Wed, 11 Feb 2015 00:30:28 +0000 (16:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Feb 2015 23:12:10 +0000 (15:12 -0800)
commit6edec0e61b1e52f9144935d28c9088f5b202e61c
tree6c0be33e56894f48033f6fffbe253bea3852e91c
parent26c4f7da3e413da697a7beb22ad496390eda7da0
net: Clarify meaning of CHECKSUM_PARTIAL for receive path

The current meaning of CHECKSUM_PARTIAL for validating checksums
is that _all_ checksums in the packet are considered valid.
However, in the manner that CHECKSUM_PARTIAL is set only the checksum
at csum_start+csum_offset and any preceding checksums may
be considered valid. If there are checksums in the packet after
csum_offset it is possible they have not been verfied.

This patch changes CHECKSUM_PARTIAL logic in skb_csum_unnecessary and
__skb_gro_checksum_validate_needed to only considered checksums
referring to csum_start and any preceding checksums (with starting
offset before csum_start) to be verified.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/linux/skbuff.h