[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ai_flags in calls to getaddrinfo, broader call for reproducibility c

From: Robin Tarsiger
Subject: Re: ai_flags in calls to getaddrinfo, broader call for reproducibility check
Date: Mon, 11 Jan 2021 04:47:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

I'm sorry I haven't been able to get back to this the way I'd hoped;
too many things to deal with last week, and the machines I was planning
to use are having their own issues which I want to make sure are fixed

Eli Zaretskii wrote:
>   With AI_ALL and AI_V4MAPPED flags:
>     (network-lookup-address-info "he.net")
>       => ([216 218 236 2 0] [8193 1136 0 1283 0 0 0 2 0])
>     (network-lookup-address-info "he.net" 'ipv6)
>       => ([0 0 0 0 0 65535 55514 60418 0])
>     (network-lookup-address-info "ipv6.google.com")
>       => nil: WSANO_DATA error
>     (network-lookup-address-info "ipv6.google.com" 'ipv6)
>       => nil: WSAHOST_NOT_FOUND error
>   Without the AI_* flags:
>     (network-lookup-address-info "he.net")
>       => ([216 218 236 2 0])
>     (network-lookup-address-info "he.net" 'ipv6)
>       => nil: WSANO_DATA error
>     (network-lookup-address-info "ipv6.google.com")
>       => nil: WSAHOST_NOT_FOUND error
>     (network-lookup-ddress-info "ipv6.google.com" 'ipv6)
>       => nil: WSANO_DATA error
> Note the difference in he.net resolution with and without the 'ipv6
> argument, and also the behavior of ipv6.google.com with the ipv6
> argument.  Interesting, no?

Definitely. The behavior of "he.net" with 'ipv6 in the former group
is something I think of as to be avoided, per elsethread, but this
shows the latter truncation for nil more concretely, of course...
and the error-swapping behavior with "ipv6.google.com" is bizarre
and hard to reconcile with earlier observations, especially the
nil-family case. I wonder whether that changes with 'ipv4?

Your ipconfig result showed no "real" IPv6 connectivity, which is
about what I'd have expected but at least sweeps some tangential
possibilities away. Unfortunately there isn't a clear way to get
an idea of what upstream resolvers might be doing from the host
configuration. It occurs to me that there may be something
nsswitch-like going on as well, but I don't know what that would
be on Windows OTTOMH and I haven't had time to research it.

Thanks for showing the details; it helps avoid misunderstandings.

In the meantime, if others on the list would be willing to test these
on Windows and/or with unusual resolver configurations, especially
if you can get or point to a packet dump of how a Windows system
converts different getaddrinfo parameters to DNS requests on the
wire (and the responses, if comfortable with that), that would also
be useful. In particular, if this turns out to be specific to
Windows but not specific to that one host's network, then it may
make sense to set some flags conditioned on OS. I am also curious
whether AI_ALL _without_ AI_V4MAPPED does anything on Windows, per
what I mentioned upthread.

-RTT "Why is wanting things to be correct so messy sometimes"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]