Nmap Development mailing list archives

[PATCH] Re: WARNING: Unable to find appropriate interface for system route to ...


From: kx <kxmail () gmail com>
Date: Sat, 22 Apr 2006 00:52:11 -0400

Until someone can point me to a place where they think something else
is broken, this will fix the warning.   I forced a failure and ran a
test and the patch worked. Test output below.

NOTE: There is no need to always override the routing table, as
route_dst() will override the interface when actually sending:
memcpy(&rnfo->ii, iface, sizeof(rnfo->ii));  This patch just saves us
from throwing a route away that dnet knows about, but we can't match
to an interface.

Cheers,
  kx

--- tcpip.cc 2006-03-25 17:56:16.000000000 -0500
+++ tcpip.cc.new 2006-04-22 00:41:21.875000000 -0400
@@ -2180,6 +2180,19 @@
     }
   }
   if (i == dcrn->numifaces) {
+   /* We didn't find a matching device and we are about to fail to load this
+   route into the table.  However, if the user specified an interface, let it
+   override failing here. */
+   if (*o.device) {
+      dcrn->routes[dcrn->numroutes].device = getInterfaceByName(o.device);
+     if (!dcrn->routes[dcrn->numroutes].device) {
+       error("Could not find interface %s which was specified by -e",
o.device);
+     }
+     else {
+       dcrn->numroutes++;
+   return 0;
+     }
+   }
     error("WARNING: Unable to find appropriate interface for system
route to %s\n", addr_ntoa(&entry->route_gw));
     return 0;
   }



nmap -p80,81 scanme.insecure.org -O

Starting Nmap 4.02CSW ( http://www.insecure.org/nmap ) at 2006-04-22
00:35 Eastern Daylight Time
WARNING: Unable to find appropriate interface for system route to 192.168.1.1

WARNING: Unable to find appropriate interface for system route to 127.0.0.1

WARNING: Unable to find appropriate interface for system route to 192.168.1.100

WARNING: Unable to find appropriate interface for system route to 127.0.0.1

WARNING: Unable to find appropriate interface for system route to 192.168.1.100

WARNING: Unable to find appropriate interface for system route to 127.0.0.1

WARNING: Unable to find appropriate interface for system route to 127.0.0.1

WARNING: Unable to find appropriate interface for system route to 192.168.1.100

WARNING: Unable to find appropriate interface for system route to 192.168.1.100

nexthost: failed to determine route to 205.217.153.62
QUITTING!

nmap -p80,81 scanme.insecure.org -O -e eth0

Starting Nmap 4.02CSW ( http://www.insecure.org/nmap ) at 2006-04-22
00:35 Eastern Daylight Time
Warning:  OS detection will be MUCH less reliable because we did not find at lea
st 1 open and 1 closed TCP port
Interesting ports on scanme.nmap.org.48.153.217.205.in-addr.arpa
(205.217.153.62):
PORT   STATE    SERVICE
80/tcp open     http
81/tcp filtered hosts2-ns
Device type: broadband router
Running: Linksys embedded
OS details: Linksys WAG54G Wireless Gateway
Uptime 0.162 days (since Fri Apr 21 20:42:19 2006)

Nmap finished: 1 IP address (1 host up) scanned in 7.797 seconds

On 4/21/06, kx <kxmail () gmail com> wrote:
Well, that looks like valid output. I know how to get rid of that
warning when -e is specified and will submit a proposal patch soon. No
idea why the OpenBSD had the sendto() error, sorry Damian.

Cheers,
 kx

Attachment: tcpip.cc.patch.txt
Description:



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

Current thread: