tcp: (fixes #2914) Adv Win resilience to SequenceNumber32 wrap-around

This commit is contained in:
Natale Patriciello
2018-06-08 18:48:49 +02:00
parent 7b1bd04853
commit a5cf957540
2 changed files with 4 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ New user-visible features
Bugs fixed
----------
- Bug 2914 - Adv Win resilience to SequenceNumber wrap-around
- Bug 2921 - tcp: Add min_cwnd variable to LEDBAT
- Bug 2911 - aodv: Binary exponential backoff can become unlimited
- Bug 2901 - Add CommandLine::Parse (const std::vector<std::string>> args)

View File

@@ -2957,9 +2957,9 @@ TcpSocketBase::AdvertisedWindowSize (bool scale) const
}
else
{
uint32_t max = m_rxBuffer->MaxRxSequence ().GetValue ();
uint32_t next = m_rxBuffer->NextRxSequence ().GetValue ();
w = ( max > next ) ? max - next : 0;
NS_ASSERT_MSG (m_rxBuffer->MaxRxSequence () - m_rxBuffer->NextRxSequence () >= 0,
"Unexpected sequence number values");
w = static_cast<uint32_t> (m_rxBuffer->MaxRxSequence () - m_rxBuffer->NextRxSequence ());
}
// Ugly, but we are not modifying the state, that variable