From fba9b08f181edafe308b656d1b74a7944ed7a9a9 Mon Sep 17 00:00:00 2001 From: Michele Polese Date: Sun, 17 Sep 2017 14:59:26 -0700 Subject: [PATCH] tcp: (fixes #2769) Set ssthresh correctly upon RTO --- RELEASE_NOTES | 1 + src/internet/model/tcp-socket-base.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 7d7b76b30..a3dcf7dfa 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -116,6 +116,7 @@ Bugs fixed - Bug 2761 - Packet has no Traffic ID for CTS frames when A-MPDU is used - Bug 2762 - BindToNetDevice behaviour is not coherent with Linux - Bug 2763 - wifi management packets in the PCAPs are all marked as wrong by Wireshark +- Bug 2769 - Set ssthresh correctly upon RTO Known issues ------------ diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc index 1a5faa1bb..275b03297 100644 --- a/src/internet/model/tcp-socket-base.cc +++ b/src/internet/model/tcp-socket-base.cc @@ -3152,6 +3152,8 @@ TcpSocketBase::ReTxTimeout () return; } + uint32_t inFlightBeforeRto = BytesInFlight(); + // From RFC 6675, Section 5.1 // [RFC2018] suggests that a TCP sender SHOULD expunge the SACK // information gathered from a receiver upon a retransmission timeout @@ -3204,7 +3206,7 @@ TcpSocketBase::ReTxTimeout () // retransmission timer, decrease ssThresh if (m_tcb->m_congState != TcpSocketState::CA_LOSS || !m_txBuffer->IsHeadRetransmitted ()) { - m_tcb->m_ssThresh = m_congestionControl->GetSsThresh (m_tcb, BytesInFlight ()); + m_tcb->m_ssThresh = m_congestionControl->GetSsThresh (m_tcb, inFlightBeforeRto); } // Cwnd set to 1 MSS