]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/dccp/ipv4.c
[DCCP]: Support for partial checksums (RFC 4340, sec. 9.2)
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Fri, 10 Nov 2006 19:43:06 +0000 (17:43 -0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:22:09 +0000 (21:22 -0800)
commit6f4e5fff1e4d46714ea554fd83e44eab534e8b11
tree4b14344fd825bbcefb6e8514e98e3e796b2dc1bd
parenta11d206d0f88e092419877c7f706cafb5e1c2e57
[DCCP]: Support for partial checksums (RFC 4340, sec. 9.2)

This patch does the following:
  a) introduces variable-length checksums as specified in [RFC 4340, sec. 9.2]
  b) provides necessary socket options and documentation as to how to use them
  c) basic support and infrastructure for the Minimum Checksum Coverage feature
     [RFC 4340, sec. 9.2.1]: acceptability tests, user notification and user
     interface

In addition, it

 (1) fixes two bugs in the DCCPv4 checksum computation:
  * pseudo-header used checksum_len instead of skb->len
* incorrect checksum coverage calculation based on dccph_x
 (2) removes dccp_v4_verify_checksum() since it reduplicates code of the
     checksum computation; code calling this function is updated accordingly.
 (3) now uses skb_checksum(), which is safer than checksum_partial() if the
     sk_buff has is a non-linear buffer (has pages attached to it).
 (4) fixes an outstanding TODO item:
        * If P.CsCov is too large for the packet size, drop packet and return.

The code has been tested with applications, the latest version of tcpdump now
comes with support for partial DCCP checksums.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Documentation/networking/dccp.txt
include/linux/dccp.h
net/dccp/dccp.h
net/dccp/ipv4.c
net/dccp/ipv6.c
net/dccp/output.c
net/dccp/proto.c