tcp: (fixes #2653) to not save smaller ts

This commit is contained in:
Natale Patriciello
2017-12-13 19:05:02 +01:00
parent d742ba2155
commit d51ef3cac4
2 changed files with 9 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ New user-visible features
Bugs fixed
----------
- Bug 2505 - network: Avoid asserts in Header/Trailer deserialization
- Bug 2653 - tcp: Avoid saving smaller TS in case of packet reordering
- Bug 2764 - wifi: WifiSpectrumModelId doesn't distinguish 11ax from legacy
- Bug 2766 - core: Modify logging for int64x64 to avoid stack overflow
- Bug 2824 - ICMP opcode fr fragment timeout drop is wrong

View File

@@ -3845,6 +3845,14 @@ TcpSocketBase::ProcessOptionTimestamp (const Ptr<const TcpOption> option,
Ptr<const TcpOptionTS> ts = DynamicCast<const TcpOptionTS> (option);
// This is valid only when no overflow occours. It happens
// when a connection last longer than 50 days.
if (m_tcb->m_rcvTimestampValue > ts->GetTimestamp ())
{
// Do not save a smaller timestamp (probably there is reordering)
return;
}
m_tcb->m_rcvTimestampValue = ts->GetTimestamp ();
m_tcb->m_rcvTimestampEchoReply = ts->GetEcho ();