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
|
|
@ -1,5 +1,5 @@
|
|||
// Code generated by go generate; DO NOT EDIT.
|
||||
// Generated: 2022-05-19 20:30:45.752543 +0200 CEST m=+0.582472918
|
||||
// Generated: 2022-05-28 13:27:22.097503116 +0200 CEST m=+0.338871155
|
||||
|
||||
package netxlite
|
||||
|
||||
|
|
@ -13,6 +13,7 @@ const (
|
|||
FailureAddressInUse = "address_in_use"
|
||||
FailureAddressNotAvailable = "address_not_available"
|
||||
FailureAlreadyConnected = "already_connected"
|
||||
FailureAndroidDNSCacheNoData = "android_dns_cache_no_data"
|
||||
FailureBadAddress = "bad_address"
|
||||
FailureBadFileDescriptor = "bad_file_descriptor"
|
||||
FailureConnectionAborted = "connection_aborted"
|
||||
|
|
@ -63,6 +64,7 @@ var failuresMap = map[string]string{
|
|||
"address_in_use": "address_in_use",
|
||||
"address_not_available": "address_not_available",
|
||||
"already_connected": "already_connected",
|
||||
"android_dns_cache_no_data": "android_dns_cache_no_data",
|
||||
"bad_address": "bad_address",
|
||||
"bad_file_descriptor": "bad_file_descriptor",
|
||||
"connection_aborted": "connection_aborted",
|
||||
|
|
|
|||
Loading…
Reference in a new issue