• Neal Cardwell's avatar
    tcp: plug dst leak in tcp_v6_conn_request() · 9f10d3f6
    Neal Cardwell authored
    The code in tcp_v6_conn_request() was implicitly assuming that
    tcp_v6_send_synack() would take care of dst_release(), much as
    tcp_v4_send_synack() already does. This resulted in
    tcp_v6_conn_request() leaking a dst if sysctl_tw_recycle is enabled.
    
    This commit restructures tcp_v6_send_synack() so that it accepts a dst
    pointer and takes care of releasing the dst that is passed in, to plug
    the leak and avoid future surprises by bringing the IPv6 behavior in
    line with the IPv4 side.
    Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9f10d3f6
tcp_ipv6.c 53.8 KB