mirror of
https://github.com/nmap/nmap.git
synced 2026-08-30 05:37:05 +00:00
Use rcvdtime, not NULL, as the received time when doing ping or port updates
from ICMP probes during a protocol scan (protoscanicmphack). I don't know why it was NULL before, but that's wrong. It was probably never noticed because in the case of a port update, all that happens is a failure to update the timing. In the case of a ping probe, it would look like a dropped ping probe, but that woudl be unlikely because protocol scans usually don't take very long. I discovered it while testing code to allow ping probes to persist between host discovery and port scanning.
This commit is contained in:
parent
3daeae2fc5
commit
89d10dd9e8
1 changed files with 2 additions and 2 deletions
|
|
@ -3906,9 +3906,9 @@ static bool get_pcap_result(UltraScanInfo *USI, struct timeval *stime) {
|
|||
|
||||
if (probe->protocol() == IPPROTO_ICMP) {
|
||||
if (probe->isPing())
|
||||
ultrascan_ping_update(USI, hss, probeI, NULL);
|
||||
ultrascan_ping_update(USI, hss, probeI, &rcvdtime);
|
||||
else {
|
||||
ultrascan_port_probe_update(USI, hss, probeI, PORT_OPEN, NULL);
|
||||
ultrascan_port_probe_update(USI, hss, probeI, PORT_OPEN, &rcvdtime);
|
||||
icmp = (struct icmp *) ((char *)ip_icmp + 4 * ip_icmp->ip_hl);
|
||||
reason_sip = (ip_icmp->ip_src.s_addr == protoscanicmphackaddy.sin_addr.s_addr) ? 0 : ip_icmp->ip_src.s_addr;
|
||||
if(!icmp->icmp_code && !icmp->icmp_type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue