--- ns-allinone-3.23/ns-3.23/src/internet/model/tcp-socket-base.cc 2015-05-13 14:05:27.000000000 -0400 +++ ns-patched-3.23/ns-3.23/src/internet/model/tcp-socket-base.cc 2015-06-19 07:37:17.855146362 -0400 @@ -2065,9 +2065,9 @@ } // Notify the application of the data being sent unless this is a retransmit - if (seq == m_highTxMark) + if (m_highTxMark >= seq && m_highTxMark < (seq + sz)) { - Simulator::ScheduleNow (&TcpSocketBase::NotifyDataSent, this, sz); + Simulator::ScheduleNow (&TcpSocketBase::NotifyDataSent, this, (seq + sz - m_highTxMark.Get ())); } // Update highTxMark m_highTxMark = std::max (seq + sz, m_highTxMark.Get ());