Nmap Development mailing list archives
Re: "dnet: Failed to open device" errors on AIX, as root
From: Ben Lentz <ben.lentz () gmail com>
Date: Mon, 10 Dec 2012 16:34:41 -0500
Did you also try this patch without the second change? I think it's wrong not to assign sndd_8022_nddname. It is probably also wrong not to assign e->device, but I don't think that would actually have an effect. The only other thing I can think of is that maybe the payload needs to be padded to 60 bytes, as reported here: http://seclists.org/nmap-dev/2012/q1/96 You could try setting the --data-length option to test if this is the case. I think it is unlikely, though, as the earlier report had EMSGSIZE for this error. I think it's more likely that you need to restore the assignment to sndd_8022_nddname. David Fifield
If I apply this: *** ./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)); I get this: $ sudo /opt/local/nmap/bin/nmap -sT 10.0.17.1 Starting Nmap 6.01 ( http://nmap.org ) at 2012-12-10 16:32 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.47 seconds Interestingly enough, it works without root privileges (if I request a non-privileged scan): $ /opt/local/nmap/bin/nmap -sT 10.0.17.1 Starting Nmap 6.01 ( http://nmap.org ) at 2012-12-10 16:32 EST Nmap scan report for 10.0.17.1 Host is up (0.0020s latency). Not shown: 998 closed ports PORT STATE SERVICE 22/tcp open ssh 161/tcp open snmp Nmap done: 1 IP address (1 host up) scanned in 7.63 seconds 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 _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: "dnet: Failed to open device" errors on AIX, as root, (continued)
- Re: "dnet: Failed to open device" errors on AIX, as root Ben Lentz (Nov 12)
- Re: "dnet: Failed to open device" errors on AIX, as root David Fifield (Nov 21)
- Re: "dnet: Failed to open device" errors on AIX, as root Ben Lentz (Nov 22)
- Re: "dnet: Failed to open device" errors on AIX, as root David Fifield (Nov 22)
- Re: "dnet: Failed to open device" errors on AIX, as root Ben Lentz (Nov 23)
- Re: "dnet: Failed to open device" errors on AIX, as root David Fifield (Nov 23)
- Re: "dnet: Failed to open device" errors on AIX, as root Ben Lentz (Nov 12)
- Re: "dnet: Failed to open device" errors on AIX, as root David Fifield (Dec 08)
- Re: "dnet: Failed to open device" errors on AIX, as root Ben Lentz (Dec 08)
- Re: "dnet: Failed to open device" errors on AIX, as root David Fifield (Dec 10)
- Re: "dnet: Failed to open device" errors on AIX, as root Ben Lentz (Dec 10)
- Re: "dnet: Failed to open device" errors on AIX, as root David Fifield (Dec 10)