]> git.karo-electronics.de Git - linux-beck.git/commit
tcp: use tcp_v4_send_synack on first SYN-ACK
authorYuchung Cheng <ycheng@google.com>
Mon, 12 May 2014 03:22:11 +0000 (20:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 May 2014 21:53:02 +0000 (17:53 -0400)
commit843f4a55e336e6d0c7bb92e7f9621535bc8d5fcd
tree17010fcb1b56174476b471758c3ca4f825ccbe7f
parent89278c9dc922272df921042aafa18311f3398c6c
tcp: use tcp_v4_send_synack on first SYN-ACK

To avoid large code duplication in IPv6, we need to first simplify
the complicate SYN-ACK sending code in tcp_v4_conn_request().

To use tcp_v4(6)_send_synack() to send all SYN-ACKs, we need to
initialize the mini socket's receive window before trying to
create the child socket and/or building the SYN-ACK packet. So we move
that initialization from tcp_make_synack() to tcp_v4_conn_request()
as a new function tcp_openreq_init_req_rwin().

After this refactoring the SYN-ACK sending code is simpler and easier
to implement Fast Open for IPv6.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Daniel Lee <longinus00@gmail.com>
Signed-off-by: Jerry Chu <hkchu@google.com>
Acked-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_ipv4.c
net/ipv4/tcp_minisocks.c
net/ipv4/tcp_output.c