net: more accurate checksumming in validate_xmit_skb()
authorDavide Caratti <dcaratti@redhat.com>
Thu, 18 May 2017 13:44:41 +0000 (15:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 May 2017 23:21:29 +0000 (19:21 -0400)
commit43c26a1a45938624fb9301e8bf7dfabbed293619
tree3989a9aa42c468ea4121b3c7886eb7e64e561420
parentdba003067a43a9699bef0c4bdbe320ece5a109b8
net: more accurate checksumming in validate_xmit_skb()

skb_csum_hwoffload_help() uses netdev features and skb->csum_not_inet to
determine if skb needs software computation of Internet Checksum or crc32c
(or nothing, if this computation can be done by the hardware). Use it in
place of skb_checksum_help() in validate_xmit_skb() to avoid corruption
of non-GSO SCTP packets having skb->ip_summed equal to CHECKSUM_PARTIAL.

While at it, remove references to skb_csum_off_chk* functions, since they
are not present anymore in Linux  _ see commit cf53b1da73bd ("Revert
 "net: Add driver helper functions to determine checksum offloadability"").

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/checksum-offloads.txt
include/linux/netdevice.h
include/linux/skbuff.h
net/core/dev.c