• Jerry Chu's avatar
    tcp: TCP Fast Open Server - main code path · 168a8f58
    Jerry Chu authored
    This patch adds the main processing path to complete the TFO server
    patches.
    
    A TFO request (i.e., SYN+data packet with a TFO cookie option) first
    gets processed in tcp_v4_conn_request(). If it passes the various TFO
    checks by tcp_fastopen_check(), a child socket will be created right
    away to be accepted by applications, rather than waiting for the 3WHS
    to finish.
    
    In additon to the use of TFO cookie, a simple max_qlen based scheme
    is put in place to fend off spoofed TFO attack.
    
    When a valid ACK comes back to tcp_rcv_state_process(), it will cause
    the state of the child socket to switch from either TCP_SYN_RECV to
    TCP_ESTABLISHED, or TCP_FIN_WAIT1 to TCP_FIN_WAIT2. At this time
    retransmission will resume for any unack'ed (data, FIN,...) segments.
    Signed-off-by: default avatarH.K. Jerry Chu <hkchu@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Tom Herbert <therbert@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    168a8f58
tcp_ipv4.c 75.6 KB