tcp: (fixes #2716) Patch for bug when closing the TCP connection

This commit is contained in:
Luciano J Chaves
2017-06-03 15:05:28 -07:00
parent fb258a0f49
commit 06b2fe00ed

View File

@@ -2073,7 +2073,7 @@ TcpSocketBase::ProcessWait (Ptr<Packet> packet, const TcpHeader& tcpHeader)
// Extract the flags. PSH and URG are not honoured.
uint8_t tcpflags = tcpHeader.GetFlags () & ~(TcpHeader::PSH | TcpHeader::URG);
if (packet->GetSize () > 0 && tcpflags != TcpHeader::ACK)
if (packet->GetSize () > 0 && !(tcpflags & TcpHeader::ACK))
{ // Bare data, accept it
ReceivedData (packet, tcpHeader);
}