Nmap Development mailing list archives
Re: [nmap-svn] r24784 - in nmap-exp/weilin/nmap-nd: . libdnet-stripped/include/dnet libdnet-stripped/src libnetutil
From: David Fifield <david () bamsoftware com>
Date: Sun, 10 Jul 2011 09:49:00 -0700
On Sun, Jul 10, 2011 at 05:36:03AM -0700, commit-mailer () insecure org wrote:
Author: weilin Date: Sun Jul 10 05:36:02 2011 New Revision: 24784 Log: nmap.get_interface_info() will give IPv6 address. If no address of global scope is found, it gives a link-local IPv6 address. Modified: nmap-exp/weilin/nmap-nd/libdnet-stripped/include/dnet/intf.h nmap-exp/weilin/nmap-nd/libdnet-stripped/src/intf.c nmap-exp/weilin/nmap-nd/libnetutil/netutil.cc nmap-exp/weilin/nmap-nd/libnetutil/netutil.h nmap-exp/weilin/nmap-nd/nse_dnet.cc Modified: nmap-exp/weilin/nmap-nd/libdnet-stripped/include/dnet/intf.h ============================================================================== --- nmap-exp/weilin/nmap-nd/libdnet-stripped/include/dnet/intf.h (original) +++ nmap-exp/weilin/nmap-nd/libdnet-stripped/include/dnet/intf.h Sun Jul 10 05:36:02 2011 @@ -23,6 +23,7 @@ u_short intf_flags; /* interface flags */ u_int intf_mtu; /* interface MTU */ struct addr intf_addr; /* interface address */ + struct addr intf_addr6; /* interface IPv6 address */ struct addr intf_dst_addr; /* point-to-point dst */ struct addr intf_link_addr; /* link-layer address */ u_int intf_alias_num; /* number of aliases */
Weilin, I think this might be wrong. Unless I'm mistaken, libdnet is already getting IPv6 addresses for interfaces. You can see them with "nmap --iflist". I think they are typically stored in the intf_alias_addrs member. What might be the problem is that getInterfaceByName returns only the first matching interface, which only has a single (usually IPv4) address. The problem might just be that the NSE code doesn't look far enough into the alias list. If you call nmap.list_interfaces, do you see the interfaces with IPv6 addresses? David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [nmap-svn] r24784 - in nmap-exp/weilin/nmap-nd: . libdnet-stripped/include/dnet libdnet-stripped/src libnetutil David Fifield (Jul 10)
- Re: [nmap-svn] r24784 - in nmap-exp/weilin/nmap-nd: . libdnet-stripped/include/dnet libdnet-stripped/src libnetutil Djalal Harouni (Jul 20)