tcp: (fixes #2875) Use Rule3 of RFC6675 only with SACK enabled
authorNatale Patriciello <natale.patriciello@gmail.com>
Sun, 25 Feb 2018 11:39:35 +0100
changeset 13326 6cd38034e96f
parent 13325 e3ce81245b34
child 13327 5d3ef4fa8270
tcp: (fixes #2875) Use Rule3 of RFC6675 only with SACK enabled
RELEASE_NOTES
src/internet/model/tcp-socket-base.cc
--- a/RELEASE_NOTES	Sun Feb 25 11:37:52 2018 +0100
+++ b/RELEASE_NOTES	Sun Feb 25 11:39:35 2018 +0100
@@ -26,6 +26,7 @@
 New user-visible features
 -------------------------
 - (tcp) Added TCP-LP as congestion control module
+- (tcp) RFC 6675 third rule for generating next sequence to transmit is used only when SACK is enabled
 - (lr-wpan) Extended addressing mode is now supported.
 - (tcp) Implemented the core functionality of TCP Pacing.
 - (internet) Ipv[4,6]AddressGenerator can now check if an address or a network is allocated.
@@ -61,6 +62,7 @@
 - Bug 2854 - wifi: he-wifi-network crashes when frequency is set at 2.4 GHz
 - Bug 2873 - tcp: Potential SIGFPE in TcpYeah
 - Bug 2874 - tcp: Corrected interpretation of RFC 6675 for IsLost check
+- Bug 2875 - tcp: Use Rule3 of RFC6675 only with SACK enabled
 - Bug 2877 - wifi: Wrong data types for CWmin and CWmax
 
 Known issues
--- a/src/internet/model/tcp-socket-base.cc	Sun Feb 25 11:37:52 2018 +0100
+++ b/src/internet/model/tcp-socket-base.cc	Sun Feb 25 11:39:35 2018 +0100
@@ -2794,8 +2794,9 @@
       //       failure (no data to send), return without sending anything
       //       (i.e., terminate steps C.1 -- C.5).
       SequenceNumber32 next;
+      bool enableRule3 = m_sackEnabled && m_tcb->m_congState == TcpSocketState::CA_RECOVERY;
       if (!m_txBuffer->NextSeg (&next, m_retxThresh, m_tcb->m_segmentSize,
-                                m_tcb->m_congState == TcpSocketState::CA_RECOVERY))
+                                enableRule3))
         {
           NS_LOG_INFO ("no valid seq to transmit, or no data available");
           break;