mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 20:29:03 +00:00
Change "perfect match" test in FingerPrintResults::populateClassification.
We use printno < num_prefect_matches rather than accuracy[printno] == 1.0. In IPv4 classification, the two are equivalent, but IPv6 classifications are never fully 100%. This was causing only the first OS class and CPE to be shown for IPv6 matches.
This commit is contained in:
@@ -244,7 +244,7 @@ void FingerPrintResults::populateClassification() {
|
|||||||
// Then we have to add it ... first ensure we have room
|
// Then we have to add it ... first ensure we have room
|
||||||
if (OSR.OSC_num_matches == MAX_FP_RESULTS) {
|
if (OSR.OSC_num_matches == MAX_FP_RESULTS) {
|
||||||
// Out of space ... if the accuracy of this one is 100%, we have a problem
|
// Out of space ... if the accuracy of this one is 100%, we have a problem
|
||||||
if (accuracy[printno] == 1.0)
|
if (printno < num_perfect_matches)
|
||||||
OSR.overall_results = OSSCAN_TOOMANYMATCHES;
|
OSR.overall_results = OSSCAN_TOOMANYMATCHES;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -252,7 +252,7 @@ void FingerPrintResults::populateClassification() {
|
|||||||
// We have space, but do we even want this one? No point
|
// We have space, but do we even want this one? No point
|
||||||
// including lesser matches if we have 1 or more perfect
|
// including lesser matches if we have 1 or more perfect
|
||||||
// matches.
|
// matches.
|
||||||
if (OSR.OSC_num_perfect_matches > 0 && accuracy[printno] < 1.0) {
|
if (OSR.OSC_num_perfect_matches > 0 && printno >= num_perfect_matches) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user