1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-08 21:51:28 +00:00

Make it a warning, not a fatal error, when we can't get the hardware address

for an interface, and skip the interface. The warning looks like

Warning: Unable to get hardware address for interface %s -- skipping it.

This happens when a FireWire interface (fw*) has an address configured on Mac
OS X. Previously Nmap would die in getinterfaces so it wasn't even possible to
scan over the other interfaces.
This commit is contained in:
david
2009-07-20 18:59:58 +00:00
parent 00ae29389a
commit a88bda3d78
2 changed files with 10 additions and 3 deletions

View File

@@ -1,5 +1,11 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o Nmap now prints a warning instead of a fatal error when the hardware
address of an interface can't be found. This is the case for
FireWire interfaces, which have a hardware address format not
supported by libdnet. Thanks to Julian Berdych for the bug report.
[David]
o Added the pjl-ready-message.nse script from Aaron Leininger. This o Added the pjl-ready-message.nse script from Aaron Leininger. This
script allows viewing and setting the message displayed by printers script allows viewing and setting the message displayed by printers
that support the Printer Job Language. that support the Printer Job Language.

View File

@@ -3034,9 +3034,10 @@ static struct interface_info *getinterfaces_siocgifconf(int *howmany) {
error("Warning: Unable to open interface %s -- skipping it.", devs[count].devname); error("Warning: Unable to open interface %s -- skipping it.", devs[count].devname);
continue; continue;
} }
if (eth_get(ethsd, &ethaddr) != 0) if (eth_get(ethsd, &ethaddr) != 0) {
fatal("%s: Failed to obtain MAC address for ethernet interface (%s)", error("Warning: Unable to get hardware address for interface %s -- skipping it.", devs[count].devname);
__func__, devs[count].devname); continue;
}
memcpy(devs[count].mac, ethaddr.data, 6); memcpy(devs[count].mac, ethaddr.data, 6);
#endif /*SIOCGIFHWADDR*/ #endif /*SIOCGIFHWADDR*/
} else if (ifflags & IFF_POINTOPOINT) { } else if (ifflags & IFF_POINTOPOINT) {