1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-06 14:39:03 +00:00

Remove unneeded g_has_npcap_loopback

This commit is contained in:
dmiller
2025-04-16 00:00:05 +00:00
parent 40b5bda3ac
commit 42170b067f
8 changed files with 12 additions and 47 deletions

View File

@@ -77,10 +77,6 @@
#include "output.h"
extern NmapOps o;
#ifdef WIN32
/* from libdnet's intf-win32.c */
extern "C" int g_has_npcap_loopback;
#endif
/* Conducts an ARP ping sweep of the given hosts to determine which ones
are up on a local ethernet network */
@@ -378,7 +374,7 @@ static Target *setup_target(const HostGroupState *hs,
t->setSrcMACAddress(rnfo.ii.mac);
}
#ifdef WIN32
else if (g_has_npcap_loopback && rnfo.ii.device_type == devt_loopback) {
else if (o.have_pcap && rnfo.ii.device_type == devt_loopback) {
if (o.spoofMACAddress())
t->setSrcMACAddress(o.spoofMACAddress());
else