• Eric Dumazet's avatar
    tcp/dccp: fix behavior of stale SYN_RECV request sockets · 4bdc3d66
    Eric Dumazet authored
    When a TCP/DCCP listener is closed, its pending SYN_RECV request sockets
    become stale, meaning 3WHS can not complete.
    
    But current behavior is wrong :
    incoming packets finding such stale sockets are dropped.
    
    We need instead to cleanup the request socket and perform another
    lookup :
    - Incoming ACK will give a RST answer,
    - SYN rtx might find another listener if available.
    - We expedite cleanup of request sockets and old listener socket.
    
    Fixes: 079096f1 ("tcp/dccp: install syn_recv requests into ehash table")
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4bdc3d66
ipv6.c 28.6 KB