From bb10734d66849bc4edc18352566cc13c5ac8324b Mon Sep 17 00:00:00 2001 From: Raj Bhattacharjea Date: Wed, 16 Apr 2008 12:40:46 -0400 Subject: [PATCH 1/2] Fix for bug 166 --- src/internet-node/tcp-socket.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/internet-node/tcp-socket.cc b/src/internet-node/tcp-socket.cc index 58495f5bf..c199bf40d 100644 --- a/src/internet-node/tcp-socket.cc +++ b/src/internet-node/tcp-socket.cc @@ -695,6 +695,7 @@ bool TcpSocket::ProcessPacketAction (Actions_t a, Ptr p, // TCP SYN consumes one byte m_nextRxSequence = tcpHeader.GetSequenceNumber() + SequenceNumber(1); m_nextTxSequence = tcpHeader.GetAckNumber (); + m_firstPendingSequence = m_nextTxSequence; //bug 166 NS_LOG_DEBUG ("TcpSocket " << this << " ACK_TX_1" << " nextRxSeq " << m_nextRxSequence); SendEmptyPacket (TcpHeader::ACK); From 505de0c6854821ef7c5cba4533bdbb908c2fcfc7 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Wed, 16 Apr 2008 18:37:20 +0100 Subject: [PATCH 2/2] Address instances of different m_type's should compare differently; closes #173. --- src/node/address.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/node/address.cc b/src/node/address.cc index c27e0608b..3566c353c 100644 --- a/src/node/address.cc +++ b/src/node/address.cc @@ -111,9 +111,10 @@ ATTRIBUTE_HELPER_CPP (Address); bool operator == (const Address &a, const Address &b) { - NS_ASSERT (a.m_type == b.m_type || - a.m_type == 0 || - b.m_type == 0); + if (a.m_type != b.m_type) + { + return false; + } NS_ASSERT (a.GetLength() == b.GetLength()); return memcmp (a.m_data, b.m_data, a.m_len) == 0; }