Nmap Development mailing list archives

Re: route_dst_netlink: can't find interface "tap0"


From: David Fifield <david () bamsoftware com>
Date: Wed, 3 Oct 2012 09:34:51 -0700

On Wed, Oct 03, 2012 at 05:25:34PM +0100, Chris wrote:
Hi guys,

First off congrats on you're excellent work :)

I'm using r29928 from the SVN repository.

I'm just having problems with nmap not recognising a particular interface.

If I run a connect scan as a normal user, chris@icarus:~/Desktop$ nmap
192.168.1.222
It works fine.

If I run the same connect scan as a root user:

Starting Nmap 6.02 ( http://nmap.org ) at 2012-10-03 14:43 BST
route_dst_netlink: can't find interface "tap0"

Even though "ifconfig tap0" shows the interface is up:

tap0      Link encap:Ethernet  HWaddr 4a:40:62:24:53:5e
          inet6 addr: fe80::4840:62ff:fe24:535e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10116775 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10105187 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:1058003528 (1.0 GB)  TX bytes:989857608 (989.8 MB)

Additionally:

chris@icarus:~/moving$ sudo nmap --iflist
[sudo] password for chris:

Starting Nmap 6.02 ( http://nmap.org ) at 2012-10-03 17:18 BST
************************INTERFACES************************
DEV   (SHORT) IP/MASK                      TYPE     UP MTU   MAC
tap0  (tap0)  (null)/0                     ethernet up 1500  4A:40:62:24:53:5E
tap0  (tap0)  fe80::4840:62ff:fe24:535e/64 ethernet up 1500  4A:40:62:24:53:5E

I think the error here is the tap0 interface has no address configured,
and so the interface entry has an af of AF_UNSPEC, not AF_INET, so
getInterfaceByName doesn't find it. The routing loop shouldn't quit just
for this.

Please try this patch, which adds a fallback search for AF_UNSPEC.

David Fifield

Attachment: route_dst_netlink-AF_UNSPEC.patch
Description:

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

Current thread: