]> git.baikalelectronics.ru Git - kernel.git/commit
net: Make enabling of zero UDP6 csums more restrictive
authorTom Herbert <therbert@google.com>
Fri, 23 May 2014 15:47:32 +0000 (08:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 May 2014 20:28:53 +0000 (16:28 -0400)
commite2ec47a7658e7a166f4fe2fb08450321d3a01168
tree7323d68eaf334d9040a9d5a709c56caf2a7aaeeb
parent9666b8fd3c039f07502bef5398d3db1ca7bc7f59
net: Make enabling of zero UDP6 csums more restrictive

RFC 6935 permits zero checksums to be used in IPv6 however this is
recommended only for certain tunnel protocols, it does not make
checksums completely optional like they are in IPv4.

This patch restricts the use of IPv6 zero checksums that was previously
intoduced. no_check6_tx and no_check6_rx have been added to control
the use of checksums in UDP6 RX and TX path. The normal
sk_no_check_{rx,tx} settings are not used (this avoids ambiguity when
dealing with a dual stack socket).

A helper function has been added (udp_set_no_check6) which can be
called by tunnel impelmentations to all zero checksums (send on the
socket, and accept them as valid).

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/udp.h
include/uapi/linux/udp.h
net/ipv4/udp.c
net/ipv6/udp.c