1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 08:29:04 +00:00

Don't assign any routes to interfaces that are not up.

This commit is contained in:
david
2012-09-14 15:51:12 +00:00
parent 0c1fd3e9d9
commit 3fb047e237

View File

@@ -1523,6 +1523,8 @@ static struct dnet_collector_route_nfo *sysroutes_dnet_find_interfaces(struct dn
/* First we match up routes whose gateway address directly matches the
address of an interface. */
for (j = 0; j < numifaces; j++) {
if (!ifaces[j].device_up)
continue;
if (sockaddr_equal_netmask(&ifaces[j].addr, &dcrn->routes[i].gw, ifaces[j].netmask_bits)) {
dcrn->routes[i].device = &ifaces[j];
break;