diff --git a/internal/experiment/webconnectivitylte/analysisclassic.go b/internal/experiment/webconnectivitylte/analysisclassic.go index a8c5d0593..c4c765357 100644 --- a/internal/experiment/webconnectivitylte/analysisclassic.go +++ b/internal/experiment/webconnectivitylte/analysisclassic.go @@ -373,10 +373,13 @@ func analysisClassicComputeBlockingAccessible(woa *minipipeline.WebAnalysis, tk return } - // 5.3. Special case for when the probe failed with dns_no_data and the - // test helper returned no addresses, which is its way to tell us the same - // error occurred but we need to interpret it as dns_no_data. - if !entry.ControlDNSResolvedAddrs.IsNone() && + // 5.3. Special case for when the probe failed with dns_no_answer and the test helper + // returned no addresses, which is its way to tell us the same error occurred but we + // need to interpret this result like the TH failed with dns_no_answer. + // + // Obviously, the TH cannot change because that would break backward compatibility. + if entry.Failure.Unwrap() == netxlite.FailureDNSNoAnswer && + !entry.ControlDNSResolvedAddrs.IsNone() && entry.ControlDNSResolvedAddrs.Unwrap().Len() <= 0 { tk.setWebsiteDown() return diff --git a/internal/minipipeline/analysis.go b/internal/minipipeline/analysis.go index 8b8b3e2dd..51ba58149 100644 --- a/internal/minipipeline/analysis.go +++ b/internal/minipipeline/analysis.go @@ -4,6 +4,7 @@ import ( "sort" "github.com/ooni/probe-cli/v3/internal/model" + "github.com/ooni/probe-cli/v3/internal/netxlite" "github.com/ooni/probe-cli/v3/internal/optional" "github.com/ooni/probe-cli/v3/internal/runtimex" ) @@ -453,9 +454,11 @@ func (wa *WebAnalysis) dnsComputeFailureMetrics(c *WebObservationsContainer) { // When the probe says dns_no_answer the control would otherwise say that // we have resolved zero IP addresses for historical reasons. In such a case, // let's pretend also the control returned dns_no_answer. - if !obs.ControlDNSResolvedAddrs.IsNone() && obs.ControlDNSResolvedAddrs.Unwrap().Len() <= 0 { - wa.DNSLookupExpectedFailure.Add(obs.DNSTransactionID.Unwrap()) - continue + if failure == netxlite.FailureDNSNoAnswer { + if !obs.ControlDNSResolvedAddrs.IsNone() && obs.ControlDNSResolvedAddrs.Unwrap().Len() <= 0 { + wa.DNSLookupExpectedFailure.Add(obs.DNSTransactionID.Unwrap()) + continue + } } wa.DNSLookupUnexpectedFailure.Add(obs.DNSTransactionID.Unwrap()) continue