mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 05:39:01 +00:00
Fix 'INTERFACES: NONE FOUND' for real. See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821913
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Changed libdnet-stripped to avoid bailing completely when an interface is
|
||||
encountered with an unsupported hardware address type. Caused "INTERFACES:
|
||||
NONE FOUND!" bugs in Nmap whenever Linux kernel added new hardware address
|
||||
types. [Daniel Miller]
|
||||
|
||||
o [NSE][GH362] Added support for LDAP over udp to ldap-rootdse.nse.
|
||||
Also added version detection and information extraction to match the
|
||||
new LDAP LDAPSearchReq and LDAPSearchReqUDP probes. [Tom Sellers]
|
||||
|
||||
@@ -2262,3 +2262,25 @@ index 3c09f9c..77225b6 100644
|
||||
|
||||
/* Loop through all the pcap devices until we find a match. */
|
||||
selected = NULL;
|
||||
|
||||
o Avoid bailing completely when an interface is encountered with an unsupported
|
||||
hardware address type. Caused "INTERFACES: NONE FOUND!" bugs in Nmap.
|
||||
|
||||
diff --git a/libdnet-stripped/src/intf.c b/libdnet-stripped/src/intf.c
|
||||
index b71fb82..315e7b0 100644
|
||||
--- a/libdnet-stripped/src/intf.c
|
||||
+++ b/libdnet-stripped/src/intf.c
|
||||
@@ -561,8 +561,11 @@ _intf_get_noalias(intf_t *intf, struct intf_entry *entry)
|
||||
#elif defined(SIOCGIFHWADDR)
|
||||
if (ioctl(intf->fd, SIOCGIFHWADDR, &ifr) < 0)
|
||||
return (-1);
|
||||
- if (addr_ston(&ifr.ifr_addr, &entry->intf_link_addr) < 0)
|
||||
- return (-1);
|
||||
+ if (addr_ston(&ifr.ifr_addr, &entry->intf_link_addr) < 0) {
|
||||
+ /* Likely we got an unsupported address type. Just use NONE for now. */
|
||||
+ entry->intf_link_addr.addr_type = ADDR_TYPE_NONE;
|
||||
+ entry->intf_link_addr.addr_bits = 0;
|
||||
+ }
|
||||
#elif defined(SIOCRPHYSADDR)
|
||||
/* Tru64 */
|
||||
struct ifdevea *ifd = (struct ifdevea *)𝔦 /* XXX */
|
||||
|
||||
@@ -561,8 +561,11 @@ _intf_get_noalias(intf_t *intf, struct intf_entry *entry)
|
||||
#elif defined(SIOCGIFHWADDR)
|
||||
if (ioctl(intf->fd, SIOCGIFHWADDR, &ifr) < 0)
|
||||
return (-1);
|
||||
if (addr_ston(&ifr.ifr_addr, &entry->intf_link_addr) < 0)
|
||||
return (-1);
|
||||
if (addr_ston(&ifr.ifr_addr, &entry->intf_link_addr) < 0) {
|
||||
/* Likely we got an unsupported address type. Just use NONE for now. */
|
||||
entry->intf_link_addr.addr_type = ADDR_TYPE_NONE;
|
||||
entry->intf_link_addr.addr_bits = 0;
|
||||
}
|
||||
#elif defined(SIOCRPHYSADDR)
|
||||
/* Tru64 */
|
||||
struct ifdevea *ifd = (struct ifdevea *)𝔦 /* XXX */
|
||||
|
||||
Reference in New Issue
Block a user