Define UDP_ENCAP_* from Linux 4.7 in netinet/udp.h

Message ID alpine.DEB.2.20.1608022102150.18856@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Aug. 2, 2016, 9:03 p.m. UTC
  This patch adds the new UDP_ENCAP_GTP0 and UDP_ENCAP_GTP1U from Linux
4.7 to sysdeps/gnu/netinet/udp.h.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

2016-08-02  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/gnu/netinet/udp.h (UDP_ENCAP_GTP0): New macro.
	(UDP_ENCAP_GTP1U): Likewise.
  

Comments

Florian Weimer Aug. 3, 2016, 10:34 a.m. UTC | #1
On 08/02/2016 11:03 PM, Joseph Myers wrote:
> This patch adds the new UDP_ENCAP_GTP0 and UDP_ENCAP_GTP1U from Linux
> 4.7 to sysdeps/gnu/netinet/udp.h.
>
> Tested for x86_64 and x86 (testsuite, and that installed stripped
> shared libraries are unchanged by the patch).
>
> 2016-08-02  Joseph Myers  <joseph@codesourcery.com>
>
> 	* sysdeps/gnu/netinet/udp.h (UDP_ENCAP_GTP0): New macro.
> 	(UDP_ENCAP_GTP1U): Likewise.

Double-checked against kernel sources.  Looks good to me.

Thanks,
Florian
  

Patch

diff --git a/sysdeps/gnu/netinet/udp.h b/sysdeps/gnu/netinet/udp.h
index bcc3213..e3d4492 100644
--- a/sysdeps/gnu/netinet/udp.h
+++ b/sysdeps/gnu/netinet/udp.h
@@ -87,6 +87,8 @@  struct udphdr
 #define UDP_ENCAP_ESPINUDP_NON_IKE 1	/* draft-ietf-ipsec-nat-t-ike-00/01 */
 #define UDP_ENCAP_ESPINUDP	2	/* draft-ietf-ipsec-udp-encaps-06 */
 #define UDP_ENCAP_L2TPINUDP	3	/* rfc2661 */
+#define UDP_ENCAP_GTP0		4	/* GSM TS 09.60 */
+#define UDP_ENCAP_GTP1U		5	/* 3GPP TS 29.060 */
 
 #define SOL_UDP            17      /* sockopt level for UDP */