mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 17:59:04 +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:
@@ -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--;
|
||||
|
||||
Reference in New Issue
Block a user