]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fastopen: accept data/FIN present in SYNACK message
authorEric Dumazet <edumazet@google.com>
Tue, 2 Feb 2016 05:03:07 +0000 (21:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Feb 2016 08:11:59 +0000 (03:11 -0500)
commit288c95a5e0c9318e6cdc4863bd95d15f00cf18e1
tree23b90b077db8d7abd03efdfe331720e12c70e219
parentceb00a25e26d07fc62a4e2018176002b3a512196
tcp: fastopen: accept data/FIN present in SYNACK message

RFC 7413 (TCP Fast Open) 4.2.2 states that the SYNACK message
MAY include data and/or FIN

This patch adds support for the client side :

If we receive a SYNACK with payload or FIN, queue the skb instead
of ignoring it.

Since we already support the same for SYN, we refactor the existing
code and reuse it. Note we need to clone the skb, so this operation
might fail under memory pressure.

Sara Dickinson pointed out FreeBSD server Fast Open implementation
was planned to generate such SYNACK in the future.

The server side might be implemented on linux later.

Reported-by: Sara Dickinson <sara@sinodun.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_fastopen.c
net/ipv4/tcp_input.c