1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-16 04:39:03 +00:00

Update request id on resend, bug discovered by bonsaiviking

This commit is contained in:
gio
2015-07-30 06:27:53 +00:00
parent 30b63ffa68
commit 6fdae80e41

View File

@@ -525,11 +525,12 @@ static void put_dns_packet_on_wire(request *req) {
struct timeval now, timeout;
plen = DNS::Factory::buildReverseRequest(*req->targ->TargetSockAddr(), packet, maxlen);
req->id = DNS::Factory::progressiveId;
req->curr_server->write_busy = 1;
req->curr_server->reqs_on_wire++;
plen = DNS::Factory::buildReverseRequest(*req->targ->TargetSockAddr(), packet, maxlen);
memcpy(&now, nsock_gettimeofday(), sizeof(struct timeval));
TIMEVAL_MSEC_ADD(timeout, now, read_timeouts[read_timeout_index][req->tries]);
memcpy(&req->timeout, &timeout, sizeof(struct timeval));
@@ -1118,7 +1119,6 @@ static void nmap_mass_rdns_core(Target **targets, int num_targets) {
tpreq->targ = *hostI;
tpreq->tries = 0;
tpreq->servers_tried = 0;
tpreq->id = DNS::Factory::progressiveId;
new_reqs.push_back(tpreq);