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

(-)i/src/internet/model/tcp-socket-base.cc (-6 / +12 lines)
 Lines 1700-1706   TcpSocketBase::ReceivedAck (Ptr<Packet> packet, const TcpHeader& tcpHeader) Link Here 
1700
1700
1701
  // RFC 6675 Section 5: 2nd, 3rd paragraph and point (A), (B) implementation
1701
  // RFC 6675 Section 5: 2nd, 3rd paragraph and point (A), (B) implementation
1702
  // are inside the function ProcessAck
1702
  // are inside the function ProcessAck
1703
  ProcessAck (ackNumber, scoreboardUpdated, oldHeadSequence);
1703
  ProcessAck (ackNumber, scoreboardUpdated, oldHeadSequence, packet->GetSize ());
1704
1704
1705
  // If there is any data piggybacked, store it into m_rxBuffer
1705
  // If there is any data piggybacked, store it into m_rxBuffer
1706
  if (packet->GetSize () > 0)
1706
  if (packet->GetSize () > 0)
 Lines 1715-1721   TcpSocketBase::ReceivedAck (Ptr<Packet> packet, const TcpHeader& tcpHeader) Link Here 
1715
1715
1716
void
1716
void
1717
TcpSocketBase::ProcessAck (const SequenceNumber32 &ackNumber, bool scoreboardUpdated,
1717
TcpSocketBase::ProcessAck (const SequenceNumber32 &ackNumber, bool scoreboardUpdated,
1718
                           const SequenceNumber32 &oldHeadSequence)
1718
                           const SequenceNumber32 &oldHeadSequence, uint32_t size)
1719
{
1719
{
1720
  NS_LOG_FUNCTION (this << ackNumber << scoreboardUpdated);
1720
  NS_LOG_FUNCTION (this << ackNumber << scoreboardUpdated);
1721
  // RFC 6675, Section 5, 2nd paragraph:
1721
  // RFC 6675, Section 5, 2nd paragraph:
 Lines 1742-1751   TcpSocketBase::ProcessAck (const SequenceNumber32 &ackNumber, bool scoreboardUpd Link Here 
1742
   *     HighData (m_highTxMark)
1742
   *     HighData (m_highTxMark)
1743
   */
1743
   */
1744
1744
1745
  bool isDupack = m_sackEnabled ?
1745
  bool isDupack = scoreboardUpdated;
1746
    scoreboardUpdated
1746
1747
    : ackNumber == oldHeadSequence &&
1747
  if (!m_sackEnabled)
1748
    ackNumber < m_tcb->m_highTxMark;
1748
    {
1749
      // SYN and FIN are both OFF thanks to the state processing
1750
      isDupack = UnAckDataCount () > 0 &&           // condition (a)
1751
	         size == 0 &&                       // condition (b)
1752
	         ackNumber == oldHeadSequence &&    // condition (d)
1753
                 ackNumber < m_tcb->m_highTxMark;  // safety consideration
1754
    }
1749
1755
1750
  NS_LOG_DEBUG ("ACK of " << ackNumber <<
1756
  NS_LOG_DEBUG ("ACK of " << ackNumber <<
1751
                " SND.UNA=" << oldHeadSequence <<
1757
                " SND.UNA=" << oldHeadSequence <<
(-)i/src/internet/model/tcp-socket-base.h (-1 / +2 lines)
 Lines 962-971   protected: Link Here 
962
   * \param ackNumber ack number
962
   * \param ackNumber ack number
963
   * \param scoreboardUpdated if true indicates that the scoreboard has been
963
   * \param scoreboardUpdated if true indicates that the scoreboard has been
964
   * \param oldHeadSequence value of HeadSequence before ack
964
   * \param oldHeadSequence value of HeadSequence before ack
965
   * \param size Packet size
965
   * updated with SACK information
966
   * updated with SACK information
966
   */
967
   */
967
  virtual void ProcessAck (const SequenceNumber32 &ackNumber, bool scoreboardUpdated,
968
  virtual void ProcessAck (const SequenceNumber32 &ackNumber, bool scoreboardUpdated,
968
                           const SequenceNumber32 &oldHeadSequence);
969
                           const SequenceNumber32 &oldHeadSequence, uint32_t size);
969
970
970
  /**
971
  /**
971
   * \brief Recv of a data, put into buffer, call L7 to get it if necessary
972
   * \brief Recv of a data, put into buffer, call L7 to get it if necessary

Return to bug 2944