Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Jan 24, 2024
1 parent 16e674c commit 5c2f83a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
11 changes: 7 additions & 4 deletions internal/experiment/webconnectivitylte/analysisclassic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions internal/minipipeline/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5c2f83a

Please sign in to comment.