Nmap Development mailing list archives

Re: dnet\os.h - new libdnet version


From: David Fifield <david () bamsoftware com>
Date: Fri, 29 Aug 2008 22:54:29 -0600

On Sat, Aug 30, 2008 at 07:51:08AM +0530, Kris Katterjohn wrote:
On 8/30/08, Fyodor <fyodor () insecure org> wrote:
On Fri, Aug 29, 2008 at 02:29:21PM -0600, David Fifield wrote:
On Fri, Aug 15, 2008 at 02:04:18PM +0200, Gisle Vanem wrote:

To all: Did you know libdnet has a new home? It used to be at
http://libdnet.sourceforget.net/; now it's at
http://code.google.com/p/libdnet/. There was a release of version 1.12
in January 2008. Nmap's libdnet-stripped is based on 1.10. There is a
Subversion checkout available too:
svn checkout http://libdnet.googlecode.com/svn/trunk/ libdnet

Interesting.  Do we have any volunteers (David?  Kris?  Someone else?)
to upgrade our libdnet to 1.12?  A key point is that we've made many
changes (see libdnet-stripped/NMAP_MODIFICATIONS) and we'd need to be
sure that those aren't lost (at least the important ones).  I'm
guessing that some of our changes may have been picked up by the
Libdnet team, which is of course desirable.  I'm assuming that the
Libdnet license hasn't changed, but someone would have to verify that
it is still the same as libdnet-striped/LICENSE in our tree.

Very interesting indeed.

I'll take a stab at it.  Upon initial inspection it doesn't seem that
libdnet has any ChangeLog, which is unfortunate in trying to determine
what's been done wrt Nmap's modifications making it in there.  But oh
well.

See http://seclists.org/nmap-dev/2008/q2/0671.html, which documents how
I adapted a change from libdnet 1.11. It was when we were dealing with
all the "dnet: Failed to open ethX" errors. The change I integrated was
a change in how libdnet matches up dnet interface names to pcap names.
Previously it compared device descriptions, which didn't work at all
because they often differed. The change made it compare hardware
addresses instead.

Nmap had already built in a workaround for this problem, which was to
compare configured IP addresses. You can see it in src/eth-win32.c,
headed by the comment

        /* Next we must find the pcap device name corresponding to the
           device. The device description used to be compared with those
           from PacketGetAdapterNames(), but that was unrelaible...

I had a feeling that the matching of hardware addresses was always more
reliable than matching IP addresses, but a sense of caution made me put
the hardward matching second, as a fallback. However I vote that we get
back to the stock libdnet as much as possible, and remove the IP address
matching code after testing that it has no effect.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: