mirror of
https://github.com/nmap/nmap.git
synced 2026-11-21 23:21:06 +00:00
Prevent -iR from running forever if all addresses are excluded
This commit is contained in:
parent
fe777b1d7c
commit
f6d3e28ffd
1 changed files with 7 additions and 1 deletions
|
|
@ -464,9 +464,15 @@ bool HostGroupState::get_next_host(struct sockaddr_storage *ss, size_t *sslen, s
|
|||
}
|
||||
/* Check exclude list. */
|
||||
if (!addrset_contains(exclude_group, (const struct sockaddr *) ss)) {
|
||||
current_group.reject_last_host();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
current_group.reject_last_host();
|
||||
if (addrset_matches_all(exclude_group, o.af())) {
|
||||
error("All %s addresses are excluded!", o.af() == AF_INET ? "IPv4" : "IPv6");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} while (true);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue