From 480784d2528323ed4c7e4fdc0e9e1443617776d8 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 7 Mar 2012 18:23:33 +0000 Subject: [PATCH] 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. --- FingerPrintResults.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FingerPrintResults.cc b/FingerPrintResults.cc index b9d78d33c..2c880d8e8 100644 --- a/FingerPrintResults.cc +++ b/FingerPrintResults.cc @@ -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; }