mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 21:21:31 +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:
7
tcpip.cc
7
tcpip.cc
@@ -3034,9 +3034,10 @@ static struct interface_info *getinterfaces_siocgifconf(int *howmany) {
|
||||
error("Warning: Unable to open interface %s -- skipping it.", devs[count].devname);
|
||||
continue;
|
||||
}
|
||||
if (eth_get(ethsd, ðaddr) != 0)
|
||||
fatal("%s: Failed to obtain MAC address for ethernet interface (%s)",
|
||||
__func__, devs[count].devname);
|
||||
if (eth_get(ethsd, ðaddr) != 0) {
|
||||
error("Warning: Unable to get hardware address for interface %s -- skipping it.", devs[count].devname);
|
||||
continue;
|
||||
}
|
||||
memcpy(devs[count].mac, ethaddr.data, 6);
|
||||
#endif /*SIOCGIFHWADDR*/
|
||||
} else if (ifflags & IFF_POINTOPOINT) {
|
||||
|
||||
Reference in New Issue
Block a user