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

Check address family before loading OS fingerprints

In addition to silencing an unnecessary fatal error when nmap-os-db is
not found but user has requested -6, this should make start times a bit
more efficient, since only 1 or the other database is loaded. Patch by
Alexandru Geana

Fixes #97
This commit is contained in:
dmiller
2015-04-07 21:31:06 +00:00
parent d17ec63ba5
commit 4a491e35d8

View File

@@ -1426,8 +1426,10 @@ void apply_delayed_options() {
if (o.osscan) { if (o.osscan) {
o.reference_FPs = parse_fingerprint_reference_file("nmap-os-db"); if (o.af() == AF_INET)
o.os_labels_ipv6 = load_fp_matches(); o.reference_FPs = parse_fingerprint_reference_file("nmap-os-db");
else if (o.af() == AF_INET6)
o.os_labels_ipv6 = load_fp_matches();
} }
// Must check and change this before validate_scan_lists // Must check and change this before validate_scan_lists