• Eric Dumazet's avatar
    tcp: no longer abort SYN_SENT when receiving some ICMP · 0a8de364
    Eric Dumazet authored
    Currently, non fatal ICMP messages received on behalf
    of SYN_SENT sockets do call tcp_ld_RTO_revert()
    to implement RFC 6069, but immediately call tcp_done(),
    thus aborting the connect() attempt.
    
    This violates RFC 1122 following requirement:
    
    4.2.3.9  ICMP Messages
    ...
              o    Destination Unreachable -- codes 0, 1, 5
    
                     Since these Unreachable messages indicate soft error
                     conditions, TCP MUST NOT abort the connection, and it
                     SHOULD make the information available to the
                     application.
    
    This patch makes sure non 'fatal' ICMP[v6] messages do not
    abort the connection attempt.
    
    It enables RFC 6069 for SYN_SENT sockets as a result.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: David Morley <morleyd@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0a8de364
tcp_ipv6.c 63.7 KB