diff -r 6568bf28a20e src/internet-stack/tcp-socket-impl.cc --- a/src/internet-stack/tcp-socket-impl.cc Mon Feb 16 17:16:45 2009 +0000 +++ b/src/internet-stack/tcp-socket-impl.cc Mon Feb 16 18:24:22 2009 +0000 @@ -665,7 +665,7 @@ header.SetFlags (flags); header.SetSequenceNumber (m_nextTxSequence); - header.SetAckNumber (m_nextRxSequence); + header.SetAckNumber (flags & TcpHeader::ACK ? m_nextRxSequence : SequenceNumber (0)); header.SetSourcePort (m_endPoint->GetLocalPort ()); header.SetDestinationPort (m_remotePort); header.SetWindowSize (AdvertisedWindowSize()); @@ -1001,7 +1001,7 @@ TcpHeader header; header.SetFlags (flags); header.SetSequenceNumber (m_nextTxSequence); - header.SetAckNumber (m_nextRxSequence); + header.SetAckNumber (withAck ? m_nextRxSequence : SequenceNumber (0)); header.SetSourcePort (m_endPoint->GetLocalPort()); header.SetDestinationPort (m_remotePort); header.SetWindowSize (AdvertisedWindowSize());