mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +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:
2
nmap.cc
2
nmap.cc
@@ -1426,7 +1426,9 @@ void apply_delayed_options() {
|
|||||||
|
|
||||||
|
|
||||||
if (o.osscan) {
|
if (o.osscan) {
|
||||||
|
if (o.af() == AF_INET)
|
||||||
o.reference_FPs = parse_fingerprint_reference_file("nmap-os-db");
|
o.reference_FPs = parse_fingerprint_reference_file("nmap-os-db");
|
||||||
|
else if (o.af() == AF_INET6)
|
||||||
o.os_labels_ipv6 = load_fp_matches();
|
o.os_labels_ipv6 = load_fp_matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user