1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +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:
david
2012-03-07 18:23:33 +00:00
parent 3f0f79b1b4
commit 480784d252

View File

@@ -244,7 +244,7 @@ void FingerPrintResults::populateClassification() {
// Then we have to add it ... first ensure we have room
if (OSR.OSC_num_matches == MAX_FP_RESULTS) {
// 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;
return;
}
@@ -252,7 +252,7 @@ void FingerPrintResults::populateClassification() {
// We have space, but do we even want this one? No point
// including lesser matches if we have 1 or more perfect
// matches.
if (OSR.OSC_num_perfect_matches > 0 && accuracy[printno] < 1.0) {
if (OSR.OSC_num_perfect_matches > 0 && printno >= num_perfect_matches) {
return;
}