1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

Improve the message "WARNING: Unable to find appropriate interface for

system route to..." to include the destination and netmask, not only the
gateway.
This commit is contained in:
david
2011-03-30 20:53:30 +00:00
parent fea17448d3
commit 61e8dfc660

View File

@@ -1517,7 +1517,11 @@ static struct dnet_collector_route_nfo *sysroutes_dnet_find_interfaces(struct dn
i = 0;
while (i < dcrn->numroutes) {
if (dcrn->routes[i].device == NULL) {
netutil_error("WARNING: Unable to find appropriate interface for system route to %s", inet_ntoa(dcrn->routes[i].gw));
struct in_addr ia;
ia.s_addr = dcrn->routes[i].dest;
netutil_error("WARNING: Unable to find appropriate interface for system route to %s/%u gw %s",
inet_ntoa(ia), dcrn->routes[i].netmask, inet_ntoa(dcrn->routes[i].gw));
/* Remove this entry from the table. */
memmove(dcrn->routes + i, dcrn->routes + i + 1, sizeof(dcrn->routes[0]) * (dcrn->numroutes - i - 1));
dcrn->numroutes--;