mirror of
https://github.com/nmap/nmap.git
synced 2025-12-25 17:09:02 +00:00
Destroy connect scan probes that aren't otherwise handled (thereby closing the
socket). It's possible to get an EHOSTUNREACH or EHOSTDOWN (and possibly other errors) against a nonexistent LAN host and formerly the socket wasn't closed. This allowed Nmap's internal count of sockets to be less that the true count of open sockets. It would eventually try to open too many sockets and quit with the message Socket creation in sendConnectScanProbe: Too many open files (24) Be aware that in this message 24 is the errno, not the number of open files.
This commit is contained in:
@@ -2798,6 +2798,8 @@ static UltraProbe *sendConnectScanProbe(UltraScanInfo *USI, HostScanStats *hss,
|
||||
hss->destroyAllOutstandingProbes();
|
||||
} else if (!USI->ping_scan && port_state != PORT_UNKNOWN) {
|
||||
ultrascan_port_probe_update(USI, hss, probeI, port_state, &USI->now);
|
||||
} else {
|
||||
hss->destroyOutstandingProbe(probeI);
|
||||
}
|
||||
probe = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user