netxlite: call getaddrinfo and handle platform-specific oddities (#764)
This commit changes our system resolver to call getaddrinfo directly when CGO is enabled. This change allows us to: 1. obtain the CNAME easily 2. obtain the real getaddrinfo retval 3. handle platform specific oddities such as `EAI_NODATA` returned on Android devices See https://github.com/ooni/probe/issues/2029 and https://github.com/ooni/probe/issues/2029#issuecomment-1140258729 in particular. See https://github.com/ooni/probe/issues/2033 for documentation regarding the desire to see `getaddrinfo`'s retval. See https://github.com/ooni/probe/issues/2118 for possible follow-up changes.
This commit is contained in:
parent
62bd62ece1
commit
cf6dbe48e0
36 changed files with 1259 additions and 59 deletions
|
|
@ -125,9 +125,14 @@ func Summarize(tk *TestKeys) (out Summary) {
|
|||
return
|
||||
}
|
||||
// If DNS failed with NXDOMAIN and the control DNS is consistent, then it
|
||||
// means this website does not exist anymore.
|
||||
// means this website does not exist anymore. We need to include the weird
|
||||
// cache failure on Android into this analysis because that failure means
|
||||
// NXDOMAIN (well, most likely) if the TH reported NXDOMAIN.
|
||||
//
|
||||
// See https://github.com/ooni/probe/issues/2029 for the Android issue.
|
||||
if tk.DNSExperimentFailure != nil &&
|
||||
*tk.DNSExperimentFailure == netxlite.FailureDNSNXDOMAINError &&
|
||||
(*tk.DNSExperimentFailure == netxlite.FailureDNSNXDOMAINError ||
|
||||
*tk.DNSExperimentFailure == netxlite.FailureAndroidDNSCacheNoData) &&
|
||||
tk.DNSConsistency != nil && *tk.DNSConsistency == DNSConsistent {
|
||||
// TODO(bassosimone): MK flags this as accessible. This result is debatable. We
|
||||
// are doing what MK does. But we most likely want to make it better later.
|
||||
|
|
|
|||
Loading…
Reference in a new issue