Nmap Development mailing list archives

Re: "dnet: Failed to open device" errors on AIX, as root


From: David Fifield <david () bamsoftware com>
Date: Mon, 4 Mar 2013 21:54:00 -0800

On Sat, Mar 02, 2013 at 04:44:35PM -0500, Ben Lentz wrote:
On Sat, Mar 2, 2013 at 2:01 AM, David Fifield <david () bamsoftware com> wrote:
On Fri, Feb 15, 2013 at 03:43:12PM -0500, Ben Lentz wrote:

    Adding --data-length doesn't seem to make a difference.

    $ sudo /opt/local/nmap/bin/nmap -sT --data-length 60 10.0.17.1

    Starting Nmap 6.01 ( http://nmap.org ) at 2012-12-10 16:33 EST
    WARNING:  eth_send of ARP packet returned -1 rather than expected 42
    (errno=19: No such device)
    WARNING:  eth_send of ARP packet returned -1 rather than expected 42
    (errno=19: No such device)
    Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
    Nmap done: 1 IP address (0 hosts up) scanned in 0.46 seconds

--data-length doesn't seem to be having an effect here. Try applying the
very last hunk of http://seclists.org/nmap-dev/2011/q4/att-353/aix.patch.

Sorry for the late reply. I applied the last hunk of patch
http://seclists.org/nmap-dev/2011/q4/att-353/aix.patch

--- libdnet-stripped/src/eth-ndd.c    (revision 27119)
+++ libdnet-stripped/src/eth-ndd.c    (working copy)

I'm sorry, I lost context. Can you show us the complete diff of changes
you have applied to your source tree? If you are in an SVN working
directory, just do "svn diff > diff.patch".

David Fifield

I am working off the source from http://nmap.org/dist/nmap-6.01.tgz.

Here is the complete diff:

*** ./libdnet-stripped/src/eth-ndd.c    Sun Dec  2 00:42:53 2012
--- ./libdnet-stripped/src/eth-ndd.c    Sun Dec  2 00:43:15 2012
***************
*** 42,48 ****
        sa.sndd_8022_family = AF_NDD;
          sa.sndd_8022_len = sizeof(sa);
        sa.sndd_8022_filtertype = NS_ETHERTYPE;
!       sa.sndd_8022_ethertype = ETH_TYPE_IP;
        sa.sndd_8022_filterlen = sizeof(struct ns_8022);
        strlcpy(sa.sndd_8022_nddname, device, sizeof(sa.sndd_8022_nddname));

--- 42,48 ----
        sa.sndd_8022_family = AF_NDD;
          sa.sndd_8022_len = sizeof(sa);
        sa.sndd_8022_filtertype = NS_ETHERTYPE;
!       sa.sndd_8022_ethertype = 0;
        sa.sndd_8022_filterlen = sizeof(struct ns_8022);
        strlcpy(sa.sndd_8022_nddname, device, sizeof(sa.sndd_8022_nddname));

It looks like you are still missing an important part of the patch.
Please try this patch which adds padding to short packets.

David Fifield

Attachment: nmap-6.01-ndd-eth_send-pad.patch
Description:

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: