Nmap Development mailing list archives

ncat behavior


From: Michal Hlavinka <mhlavink () redhat com>
Date: Thu, 25 Jun 2015 16:06:45 +0200

Hi,
I'm thinking if ncat's client behavior, when it closes stdout, instead of terminating, when server closed the socket, is the best option. In theory it looks good, to be still able to send data (half-closed socket), but the problem is that ncat is not getting all information about socket in that case. When server half-closes the socket and then exits, the client is not notified until it sends data twice(it takes two socket writes for the information to be propagated from kernel to client). This leads to client hang.

The same thing (client hangs) happens if server terminates, because it can't distinguish what exactly happened on the other side. As the need for this (send data after server half-closed socket) is quite rare use case, but terminating server is more usual, I think it's not worth it the ill side effects and should be probably changed to client termination when it reads eof. What is your opinion on this?

Regards,
Michal Hlavinka
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: