conn->LocalPort = -1;
conn->RemotePort = -1;
+ conn->Node.ReferenceCount = 1;
conn->Node.ImplPtr = conn;
conn->Node.NumACLs = 1;
conn->Node.ACLs = &gVFS_ACL_EveryoneRW;
ENTER("pNode", Node);
+ ASSERT(Node->ReferenceCount != 0);
+
+ if( Node->ReferenceCount > 1 ) {
+ Node->ReferenceCount --;
+ LOG("Dereference only");
+ LEAVE('-');
+ return ;
+ }
+
if( conn->State == TCP_ST_CLOSE_WAIT || conn->State == TCP_ST_OPEN )
{
packet.SourcePort = htons(conn->LocalPort);
switch( conn->State )
{
+ case TCP_ST_CLOSED:
+ Log_Warning("TCP", "Closing connection that was never opened");
+ break;
case TCP_ST_CLOSE_WAIT:
conn->State = TCP_ST_LAST_ACK;
break;