Add TCP_FASTOPEN_KEY, TCP_FASTOPEN_NO_COOKIE from Linux 4.15

Message ID alpine.DEB.2.20.1802011816590.21283@digraph.polyomino.org.uk
State New, archived
Headers

Commit Message

Joseph Myers Feb. 1, 2018, 6:17 p.m. UTC
  [Proposed for once the release changes for 2.27, and the post-release 
changes opening master for development for 2.28, have been committed.]

This patch adds the TCP_FASTOPEN_KEY and TCP_FASTOPEN_NO_COOKIE macros
from Linux 4.15 to sysdeps/gnu/netinet/tcp.h.

Tested for x86_64.

2018-02-01  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/gnu/netinet/tcp.h (TCP_FASTOPEN_KEY): New macro.
	(TCP_FASTOPEN_NO_COOKIE): Likewise.
  

Comments

Dmitry V. Levin Feb. 6, 2018, 12:27 a.m. UTC | #1
On Thu, Feb 01, 2018 at 06:17:15PM +0000, Joseph Myers wrote:
> [Proposed for once the release changes for 2.27, and the post-release 
> changes opening master for development for 2.28, have been committed.]
> 
> This patch adds the TCP_FASTOPEN_KEY and TCP_FASTOPEN_NO_COOKIE macros
> from Linux 4.15 to sysdeps/gnu/netinet/tcp.h.
> 
> Tested for x86_64.
> 
> 2018-02-01  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/gnu/netinet/tcp.h (TCP_FASTOPEN_KEY): New macro.
> 	(TCP_FASTOPEN_NO_COOKIE): Likewise.
> 
> diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h
> index 75973f0..44a72e9 100644
> --- a/sysdeps/gnu/netinet/tcp.h
> +++ b/sysdeps/gnu/netinet/tcp.h
> @@ -73,6 +73,8 @@
>  #define TCP_FASTOPEN_CONNECT	 30 /* Attempt FastOpen with connect.  */
>  #define TCP_ULP			 31 /* Attach a ULP to a TCP connection.  */
>  #define TCP_MD5SIG_EXT		 32 /* TCP MD5 Signature with extensions.  */
> +#define TCP_FASTOPEN_KEY	 33 /* Set the key for Fast Open (cookie).  */
> +#define TCP_FASTOPEN_NO_COOKIE	 34 /* Enable TFO without a TFO cookie.  */
>  
>  #ifdef __USE_MISC
>  # include <sys/types.h>

I've double-checked that this change matches Linux 4.15 headers.
  

Patch

diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h
index 75973f0..44a72e9 100644
--- a/sysdeps/gnu/netinet/tcp.h
+++ b/sysdeps/gnu/netinet/tcp.h
@@ -73,6 +73,8 @@ 
 #define TCP_FASTOPEN_CONNECT	 30 /* Attempt FastOpen with connect.  */
 #define TCP_ULP			 31 /* Attach a ULP to a TCP connection.  */
 #define TCP_MD5SIG_EXT		 32 /* TCP MD5 Signature with extensions.  */
+#define TCP_FASTOPEN_KEY	 33 /* Set the key for Fast Open (cookie).  */
+#define TCP_FASTOPEN_NO_COOKIE	 34 /* Enable TFO without a TFO cookie.  */
 
 #ifdef __USE_MISC
 # include <sys/types.h>