mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Don't consider any more probes after finding one of our own to localhost.
There is a special test that uses IP IDs to check if a presumed reply from localhost is actually one of our own probes. However the test didn't bail out ofter finding one of these matches, so a retransmission (with a different IP ID) could match and look like a protocol reply from localhost.
This commit is contained in:
@@ -4181,7 +4181,7 @@ static bool get_pcap_result(UltraScanInfo *USI, struct timeval *stime) {
|
||||
/* if this is our probe we sent to localhost, then it doesn't count! */
|
||||
if (sockaddr_storage_cmp(&hdr.src, &hdr.dst) == 0 &&
|
||||
probe->ipid() == hdr.ipid)
|
||||
continue;
|
||||
break;
|
||||
|
||||
/* We got a packet from the dst host in the protocol we looked for, and
|
||||
it wasn't our probe to ourselves, so it must be open */
|
||||
@@ -5105,7 +5105,7 @@ static int get_ping_pcap_result(UltraScanInfo *USI, struct timeval *stime) {
|
||||
/* if this is our probe we sent to localhost, then it doesn't count! */
|
||||
if (sockaddr_storage_cmp(&hdr.src, &hdr.dst) == 0 &&
|
||||
probe->ipid() == hdr.ipid)
|
||||
continue;
|
||||
break;
|
||||
|
||||
newstate = HOST_UP;
|
||||
current_reason = ER_PROTORESPONSE;
|
||||
|
||||
Reference in New Issue
Block a user