diff options
author | Tom Herbert <therbert@google.com> | 2014-05-23 08:47:32 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-23 16:28:53 -0400 |
commit | 1c19448c9ba6545b80ded18488a64a7f3d8e6998 (patch) | |
tree | 7323d68eaf334d9040a9d5a709c56caf2a7aaeeb /include/uapi | |
parent | 28448b80456feafe07e2d05b6363b00f61f6171e (diff) | |
download | linux-1c19448c9ba6545b80ded18488a64a7f3d8e6998.tar.gz linux-1c19448c9ba6545b80ded18488a64a7f3d8e6998.tar.bz2 linux-1c19448c9ba6545b80ded18488a64a7f3d8e6998.zip |
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>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/udp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h index e2bcfd75a30d..16574ea18f0c 100644 --- a/include/uapi/linux/udp.h +++ b/include/uapi/linux/udp.h @@ -29,6 +29,8 @@ struct udphdr { /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments */ #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */ +#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X */ +#define UDP_NO_CHECK6_RX 102 /* Disable accpeting checksum for UDP6 */ /* UDP encapsulation types */ #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ |