diff --git a/NmapOps.cc b/NmapOps.cc index 59d8249d7..3b964d327 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -363,7 +363,7 @@ void NmapOps::Initialize() { spoof_mac_set = false; mass_dns = true; deprecated_xml_osclass = false; - resolve_all = 0; + always_resolve = false; dns_servers = NULL; implicitARPPing = true; numhosts_scanned = 0; diff --git a/NmapOps.h b/NmapOps.h index 0547302c8..c06996017 100644 --- a/NmapOps.h +++ b/NmapOps.h @@ -370,7 +370,7 @@ class NmapOps { Only files that were actually read should be in this map. */ std::map loaded_data_files; bool mass_dns; - int resolve_all; + bool always_resolve; char *dns_servers; /* Do IPv4 ARP or IPv6 ND scan of directly connected Ethernet hosts, even if diff --git a/nmap.cc b/nmap.cc index fe5e2c4df..c53e5190d 100644 --- a/nmap.cc +++ b/nmap.cc @@ -1284,7 +1284,7 @@ void parse_options(int argc, char **argv) { o.portlist = strdup(optarg); break; case 'R': - o.resolve_all++; + o.always_resolve = true; break; case 'r': o.randomize_ports = 0; diff --git a/nmap_dns.cc b/nmap_dns.cc index eba19e4d1..5013a12d3 100644 --- a/nmap_dns.cc +++ b/nmap_dns.cc @@ -1162,7 +1162,7 @@ static void nmap_mass_rdns_core(Target **targets, int num_targets) { // Set up the request structure for(hostI = targets; hostI < targets+num_targets; hostI++) { - if (!((*hostI)->flags & HOST_UP) && !o.resolve_all) continue; + if (!((*hostI)->flags & HOST_UP) && !o.always_resolve) continue; // See if it's cached std::string res; @@ -1278,7 +1278,7 @@ static void nmap_system_rdns_core(Target **targets, int num_targets) { for(hostI = targets; hostI < targets+num_targets; hostI++) { currenths = *hostI; - if (((currenths->flags & HOST_UP) || o.resolve_all) && !o.noresolve) stat_actual++; + if (((currenths->flags & HOST_UP) || o.always_resolve) && !o.noresolve) stat_actual++; } Snprintf(spmobuf, sizeof(spmobuf), "System DNS resolution of %d host%s.", num_targets, num_targets-1 ? "s" : ""); @@ -1290,7 +1290,7 @@ static void nmap_system_rdns_core(Target **targets, int num_targets) { if (keyWasPressed()) SPM->printStats((double) i / stat_actual, NULL); - if (((currenths->flags & HOST_UP) || o.resolve_all) && !o.noresolve) { + if (((currenths->flags & HOST_UP) || o.always_resolve) && !o.noresolve) { if (currenths->TargetSockAddr(&ss, &sslen) != 0) fatal("Failed to get target socket address."); if (getnameinfo((struct sockaddr *)&ss, sslen, hostname, diff --git a/output.cc b/output.cc index ee470956e..df380827e 100644 --- a/output.cc +++ b/output.cc @@ -1431,7 +1431,7 @@ static char *num_to_string_sigdigits(double d, int digits) { /* Writes a heading for a full scan report ("Nmap scan report for..."), including host status and DNS records. */ void write_host_header(Target *currenths) { - if ((currenths->flags & HOST_UP) || o.verbose || o.resolve_all) { + if ((currenths->flags & HOST_UP) || o.verbose || o.always_resolve) { if (currenths->flags & HOST_UP) { log_write(LOG_PLAIN, "Nmap scan report for %s\n", currenths->NameIP()); } else if (currenths->flags & HOST_DOWN) {