]> git.baikalelectronics.ru Git - kernel.git/commit
net: Handle CHECKSUM_COMPLETE more adequately in pskb_trim_rcsum().
authorDavid S. Miller <davem@davemloft.net>
Sat, 16 Nov 2013 02:11:16 +0000 (21:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Nov 2013 02:11:16 +0000 (21:11 -0500)
commitdad05ac30fdc71d09622c062322ba13b0e7406f1
tree5baf9a09e9619cf10d0e399e4ba347eab32b5afb
parent2b8466966203e998451c4499a337be709bcbbb9e
net: Handle CHECKSUM_COMPLETE more adequately in pskb_trim_rcsum().

Currently pskb_trim_rcsum() just balks on CHECKSUM_COMPLETE packets
and remarks them as CHECKSUM_NONE, forcing a software checksum
validation later.

We have all of the mechanics available to fixup the skb->csum value,
even for complicated fragmented packets, via the helpers
skb_checksum() and csum_sub().

So just use them.

Based upon a suggestion by Herbert Xu.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h