1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-06 06:29:03 +00:00

Consolidate private IP checking. Add IPv6.

This commit is contained in:
dmiller
2025-01-16 23:00:13 +00:00
parent 3584adf32d
commit 390e0266db
6 changed files with 50 additions and 119 deletions

View File

@@ -1771,7 +1771,7 @@ void apply_delayed_options() {
while (i--) {
do {
((struct sockaddr_in *)&o.decoys[o.numdecoys])->sin_addr.s_addr = get_random_u32();
} while (ip_is_reserved(&((struct sockaddr_in *)&o.decoys[o.numdecoys])->sin_addr));
} while (ip_is_reserved(&o.decoys[o.numdecoys]));
o.numdecoys++;
}
} else {