1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-13 09:59:01 +00:00

Match ICMP ID with returned probes to avoid interference with other scans. Fixes #110

This commit is contained in:
dmiller
2015-06-01 13:42:19 +00:00
parent 6bcb9d3908
commit a61d7dcc17

View File

@@ -651,7 +651,8 @@ int get_ping_pcap_result(UltraScanInfo *USI, struct timeval *stime) {
if (probe->protocol() != encaps_hdr.proto ||
sockaddr_storage_cmp(&target_src, &hdr.dst) != 0 ||
sockaddr_storage_cmp(&target_src, &encaps_hdr.src) != 0 ||
sockaddr_storage_cmp(&target_dst, &encaps_hdr.dst) != 0)
sockaddr_storage_cmp(&target_dst, &encaps_hdr.dst) != 0 ||
ntohs(ping->id) != probe->icmpid())
continue;
if ((encaps_hdr.proto == IPPROTO_ICMP || encaps_hdr.proto == IPPROTO_ICMPV6)