bug 1509 RTTEstimator invalid values fix

This commit is contained in:
Brian Swenson
2012-11-05 14:07:02 -05:00
parent bc58d43b16
commit 9155fc6a39
2 changed files with 11 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ Bugs fixed
- bug 1493 - test.py --list should show the test type default tip
- bug 1494 - test.py --constrain doesn't work
- bug 1495 - test.py claims test passed when no test was run
- bug 1509 - rttEstimator returns invalid value in presence of errors
Known issues
------------

View File

@@ -1982,7 +1982,16 @@ TcpSocketBase::EstimateRtt (const TcpHeader& tcpHeader)
// Use m_rtt for the estimation. Note, RTT of duplicated acknowledgement
// (which should be ignored) is handled by m_rtt. Once timestamp option
// is implemented, this function would be more elaborated.
m_lastRtt = m_rtt->AckSeq (tcpHeader.GetAckNumber () );
Time nextRtt = m_rtt->AckSeq (tcpHeader.GetAckNumber () );
//nextRtt will be zero for dup acks. Don't want to update lastRtt in that case
//but still needed to do list clearing that is done in AckSeq.
if(nextRtt != 0)
{
m_lastRtt = nextRtt;
NS_LOG_FUNCTION(this << m_lastRtt);
}
}
// Called by the ReceivedAck() when new ACK received and by ProcessSynRcvd()