• Damian Lukowski's avatar
    tcp: fix ICMP-RTO war · 59885640
    Damian Lukowski authored
    Make sure, that TCP has a nonzero RTT estimation after three-way
    handshake. Currently, a listening TCP has a value of 0 for srtt,
    rttvar and rto right after the three-way handshake is completed
    with TCP timestamps disabled.
    This will lead to corrupt RTO recalculation and retransmission
    flood when RTO is recalculated on backoff reversion as introduced
    in "Revert RTO on ICMP destination unreachable"
    (f1ecd5d9).
    This behaviour can be provoked by connecting to a server which
    "responds first" (like SMTP) and rejecting every packet after
    the handshake with dest-unreachable, which will lead to softirq
    load on the server (up to 30% per socket in some tests).
    
    Thanks to Ilpo Jarvinen for providing debug patches and to
    Denys Fedoryshchenko for reporting and testing.
    
    Changes since v3: Removed bad characters in patchfile.
    Reported-by: default avatarDenys Fedoryshchenko <denys@visp.net.lb>
    Signed-off-by: default avatarDamian Lukowski <damian@tvk.rwth-aachen.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    59885640
tcp_input.c 167 KB