History

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).

Tom Herbert committed 12 years ago

Commit 1c194481 parent 28448b84 files · +48 −6Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/udp.h+2−0
@@ -29,6 +29,8 @@ struct udphdr { · 28 unmodified lines
29/* UDP socket options */29/* UDP socket options */
30#define UDP_CORK 1 /* Never send partially complete segments */30#define UDP_CORK 1 /* Never send partially complete segments */
31#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */31#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
32#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X */
33#define UDP_NO_CHECK6_RX 102 /* Disable accpeting checksum for UDP6 */
32 34
33/* UDP encapsulation types */35/* UDP encapsulation types */
34#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */36#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */