Nmap Development mailing list archives
[PATCH] make nmap work in certain network setups
From: "Dmitry V. Levin" <ldv () owl openwall com>
Date: Thu, 23 Jul 2009 22:04:25 +0400
Hi, Looks like nmap fails to run from root user in certain network setups, e.g. inside OVZ container where main network interface (venet0) has no IP address and IP addresses are assigned to its aliases (venet0:1, etc.). In such setup, nmap aborts with the following diagnostics: Failed to find device venet0 which was referenced in /proc/net/route Failed to find device venet0 which was referenced in /proc/net/route nexthost: failed to determine route to [real IP address] QUITTING! Proposed patch workarounds this problem by considering interface aliases when main interface mentioned in the route file has no IP address. Better fix for this and other routing issues would be to use RTM_GETROUTE netlink API instead of manual route determination, but such change to the code is going to be more intrusive. Another problem with nmap in the aforementioned network setup is that it fails later with the following diagnostics: Failed to lookup subnet/netmask for device (venet0): venet0: no IPv4 address assigned QUITTING! This happens because pcap_lookupnet() is being called with normalized device name instead of full device name. It looks like a bug, and proposed patch fixes this issue, too. -- ldv
Attachment:
nmap-5.00-owl-route.diff
Description:
Attachment:
_bin
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] make nmap work in certain network setups Dmitry V. Levin (Jul 23)
- Re: [PATCH] make nmap work in certain network setups David Fifield (Jul 27)