Bugzilla – Bug 2258
Discarded segments update RTT as well as TCP options
Last modified: 2016-01-22 08:58:10 UTC
Created attachment 2226 [details] Patch In DoForwardUp, we have this code: m_rxTrace (packet, tcpHeader, this); ReadOptions (tcpHeader); if (tcpHeader.GetFlags () & TcpHeader::ACK) { EstimateRtt (tcpHeader); } // Discard fully out of range data packets if (packet->GetSize () && OutOfRange (tcpHeader.GetSequenceNumber (), tcpHeader.GetSequenceNumber () + packet->GetSize ())) { NS_LOG_LOGIC ("At state " << TcpStateName[m_state] << " received packet of seq [" << tcpHeader.GetSequenceNumber () << ":" << tcpHeader.GetSequenceNumber () + packet->GetSize () << ") out of range [" << m_rxBuffer->NextRxSequence () << ":" << m_rxBuffer->MaxRxSequence () << ")"); // Acknowledgement should be sent for all unacceptable packets (RFC793, p.69) if (m_state == ESTABLISHED && !(tcpHeader.GetFlags () & TcpHeader::RST)) { SendEmptyPacket (TcpHeader::ACK); } return; } clearly, a discarded segment should not be allowed to update both rtt and options. Trivially patched to move up the discard part. Waiting for comments before applying.
I agree with the patch.
Changeset 11827:26cef97eafa8