Nmap Development mailing list archives
Re: [nmap-svn] r33574 - nmap-exp/d33tah/nmap-nsock-scan
From: Jacek Wielemborek <d33tah () gmail com>
Date: Thu, 11 Sep 2014 14:03:52 +0200
11.09.2014 11:30, Fyodor:
On Mon, Aug 18, 2014 at 10:15 AM, <commit-mailer () nmap org> wrote:Author: d33tah Date: Mon Aug 18 17:15:01 2014 New Revision: 33574 Log: I have no idea why this comment was there. Modified: nmap-exp/d33tah/nmap-nsock-scan/nsock_scan.cc Modified: nmap-exp/d33tah/nmap-nsock-scan/nsock_scan.cc ============================================================================== --- nmap-exp/d33tah/nmap-nsock-scan/nsock_scan.cc (original) +++ nmap-exp/d33tah/nmap-nsock-scan/nsock_scan.cc Mon Aug 18 17:15:01 2014 @@ -718,8 +718,6 @@ void NsockTCPScanEngine::errnoToPortState(int connect_errno, int *port_state, int *reason_id) { switch (connect_errno) { - /* This can happen on localhost, successful/failing connection - immediately in non-blocking mode. */case ECONNREFUSED:*port_state = PORT_CLOSED; *reason_id = ER_CONREFUSED;Just FYI, it's because some people are surprised that a nonblocking connect() call can return connection success or refused immediately, since we normally only get that information later (e.g. after doing a select() on the socket). After all, you're telling the system that you aren't willing to wait. But if you are doing the connect against localhost, the connect() call can actually succeed (or fail) right there on the spot. So we need to handle that case here. Maybe the comment doesn't make this clear enough though. Cheers, Fyodor _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Yes, I know what this comment meant, it's just that it was in MY code in a spot where it doesn't make sense. I probably copied it from scan_engine.cc.
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [nmap-svn] r33574 - nmap-exp/d33tah/nmap-nsock-scan Fyodor (Sep 11)
- Re: [nmap-svn] r33574 - nmap-exp/d33tah/nmap-nsock-scan Jacek Wielemborek (Sep 11)