View | Details | Raw Unified | Return to bug 2076
Collapse All | Expand All

(-)a/src/internet/model/tcp-socket-base.cc (-4 / +4 lines)
 Lines 97-103    Link Here 
97
                   MakeBooleanChecker ())
97
                   MakeBooleanChecker ())
98
    .AddAttribute ("MinRto",
98
    .AddAttribute ("MinRto",
99
                   "Minimum retransmit timeout value",
99
                   "Minimum retransmit timeout value",
100
                   TimeValue (Seconds (0.2)), // RFC2988 says min RTO=1 sec, but Linux uses 200ms. See http://www.postel.org/pipermail/end2end-interest/2004-November/004402.html
100
                   TimeValue (Seconds (1.0)), // RFC 6298 says min RTO=1 sec, but Linux uses 200ms. See http://www.postel.org/pipermail/end2end-interest/2004-November/004402.html
101
                   MakeTimeAccessor (&TcpSocketBase::SetMinRto,
101
                   MakeTimeAccessor (&TcpSocketBase::SetMinRto,
102
                                     &TcpSocketBase::GetMinRto),
102
                                     &TcpSocketBase::GetMinRto),
103
                                     MakeTimeChecker ())
103
                                     MakeTimeChecker ())
 Lines 1713-1719    Link Here 
1713
  header.SetWindowSize (AdvertisedWindowSize ());
1713
  header.SetWindowSize (AdvertisedWindowSize ());
1714
1714
1715
  // RFC 6298, clause 2.4
1715
  // RFC 6298, clause 2.4
1716
  m_rto = Max (m_rtt->GetEstimate () + Max (m_clockGranularity, m_rtt->GetVariation ()*4), Time::FromDouble (1,  Time::S));
1716
  m_rto = Max (m_rtt->GetEstimate () + Max (m_clockGranularity, m_rtt->GetVariation ()*4), m_minRto);
1717
1717
1718
  bool hasSyn = flags & TcpHeader::SYN;
1718
  bool hasSyn = flags & TcpHeader::SYN;
1719
  bool hasFin = flags & TcpHeader::FIN;
1719
  bool hasFin = flags & TcpHeader::FIN;
 Lines 2248-2254    Link Here 
2248
    {
2248
    {
2249
      m_rtt->Measurement (m);                // Log the measurement
2249
      m_rtt->Measurement (m);                // Log the measurement
2250
      // RFC 6298, clause 2.4
2250
      // RFC 6298, clause 2.4
2251
      m_rto = Max (m_rtt->GetEstimate () + Max (m_clockGranularity, m_rtt->GetVariation ()*4), Time::FromDouble (1,  Time::S));
2251
      m_rto = Max (m_rtt->GetEstimate () + Max (m_clockGranularity, m_rtt->GetVariation ()*4), m_minRto);
2252
      m_lastRtt = m_rtt->GetEstimate ();
2252
      m_lastRtt = m_rtt->GetEstimate ();
2253
      NS_LOG_FUNCTION(this << m_lastRtt);
2253
      NS_LOG_FUNCTION(this << m_lastRtt);
2254
    }
2254
    }
 Lines 2269-2275    Link Here 
2269
      m_retxEvent.Cancel ();
2269
      m_retxEvent.Cancel ();
2270
      // On receiving a "New" ack we restart retransmission timer .. RFC 6298
2270
      // On receiving a "New" ack we restart retransmission timer .. RFC 6298
2271
      // RFC 6298, clause 2.4
2271
      // RFC 6298, clause 2.4
2272
      m_rto = Max (m_rtt->GetEstimate () + Max (m_clockGranularity, m_rtt->GetVariation ()*4), Time::FromDouble (1,  Time::S));
2272
      m_rto = Max (m_rtt->GetEstimate () + Max (m_clockGranularity, m_rtt->GetVariation ()*4), m_minRto);
2273
2273
2274
      NS_LOG_LOGIC (this << " Schedule ReTxTimeout at time " <<
2274
      NS_LOG_LOGIC (this << " Schedule ReTxTimeout at time " <<
2275
                    Simulator::Now ().GetSeconds () << " to expire at time " <<
2275
                    Simulator::Now ().GetSeconds () << " to expire at time " <<

Return to bug 2076