about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-09-12 12:13:08 +0000
committerAllan McRae <allan@archlinux.org>2014-09-13 15:45:15 +1000
commit3b016908924afb5ef71ac874bedf8c6f0157941c (patch)
treeded6f016b8c06c42236ab58dd644837b1a87411e
parentb735a759ef35d73f1cfc783187fe8281b75069ac (diff)
downloadglibc-3b016908924afb5ef71ac874bedf8c6f0157941c.tar.gz
glibc-3b016908924afb5ef71ac874bedf8c6f0157941c.tar.xz
glibc-3b016908924afb5ef71ac874bedf8c6f0157941c.zip
Add new Linux 3.16 constants to netinet/udp.h.
This patch adds the new constants UDP_NO_CHECK6_TX and
UDP_NO_CHECK6_RX from Linux 3.16 to sysdeps/gnu/netinet/udp.h.  (I
believe the existing constants there are already Linux-specific,
possibly with the intention that other OSes should adopt the same
values if possible if adopting the features in question.)

Tested on x86_64.

	* sysdeps/gnu/netinet/udp.h (UDP_NO_CHECK6_TX): New macro.
	(UDP_NO_CHECK6_RX): Likewise.

(cherry picked from commit 0bd72468030947254e7de183cac1014dac884475)
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/gnu/netinet/udp.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 848e5c80e6..cc998186a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/gnu/netinet/udp.h (UDP_NO_CHECK6_TX): New macro.
+	(UDP_NO_CHECK6_RX): Likewise.
+
 2014-09-13  Allan McRae  <allan@archlinux.org>
 
 	* po/ru.po: Update Russian translation from translation project.
diff --git a/sysdeps/gnu/netinet/udp.h b/sysdeps/gnu/netinet/udp.h
index 32159cd142..8cc1c60a26 100644
--- a/sysdeps/gnu/netinet/udp.h
+++ b/sysdeps/gnu/netinet/udp.h
@@ -78,6 +78,10 @@ struct udphdr
 #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 UDP
+				   over IPv6.  */
+#define UDP_NO_CHECK6_RX 102	/* Disable accepting checksum for UDP
+				   over IPv6.  */
 
 /* UDP encapsulation types */
 #define UDP_ENCAP_ESPINUDP_NON_IKE 1	/* draft-ietf-ipsec-nat-t-ike-00/01 */