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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user