Index: scan_engine.cc =================================================================== --- scan_engine.cc (revision 31520) +++ scan_engine.cc (working copy) @@ -311,6 +311,7 @@ return (pingseq == 0 && tryno == this->tryno) || (pingseq > 0 && pingseq == this->pingseq); } + u16 icmp_ident; u8 tryno; /* Try (retransmission) number of this probe */ u8 pingseq; /* 0 if this is not a scanping. Otherwise a posative ping seq#. */ /* If true, probe is considered no longer active due to timeout, but it @@ -3624,6 +3625,7 @@ hss->probeSent(packetlen); send_ip_packet(USI->rawsd, ethptr, hss->target->TargetSockAddr(), packet, packetlen); free(packet); + probe->icmp_ident = icmp_ident; } } else if (pspec->type == PS_ICMPV6) { struct sockaddr_storage source; @@ -5053,6 +5055,12 @@ probe->ipid() == hdr.ipid) continue; /* We saw the packet we ourselves sent */ + if (ntohs(ping->seq) != probe->tryno) + continue; + + if (ntohs(ping->id) != probe->icmp_ident) + continue; + goodone = true; newstate = HOST_UP;