]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: don't include Fast Open option in SYN-ACK on pure SYN-data
authorYuchung Cheng <ycheng@google.com>
Mon, 9 Feb 2015 20:35:23 +0000 (12:35 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Feb 2015 22:26:55 +0000 (14:26 -0800)
commitd82bba7bf0a1be72939a22752f8a6e143634e44b
treef15abdcc7f4af03a3cd80e234e68acc0601a7c5d
parent184e9398559710bfc3c1edbd2bd2e74d785fc124
tcp: don't include Fast Open option in SYN-ACK on pure SYN-data

If a server has enabled Fast Open and it receives a pure SYN-data
packet (without a Fast Open option), it won't accept the data but it
incorrectly returns a SYN-ACK with a Fast Open cookie and also
increments the SNMP stat LINUX_MIB_TCPFASTOPENPASSIVEFAIL.

This patch makes the server include a Fast Open cookie in SYN-ACK
only if the SYN has some Fast Open option (i.e., when client
requests or presents a cookie).

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_fastopen.c