Re: seeking help with ipv6 qa failures
"Dave Brolley" <[email protected]> Wed, 25 Jan 2017 12:31:50 -0500
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Message-ID | <[email protected]> |
On 24/01/17 07:41 PM, Ken McDonell wrote:
> On 25/01/17 09:45, Ken McDonell wrote:
>> ...
> Eating our own debug dog food may help (someone else, not me in IPv6 land, I've barely come to grips with this new-fangled IPv4 stuff).
>
> kenj@vm00:~$ pminfo -Dall -v -h '[::1]'
> __pmConnectPMCD: trying __pmAuxConnectPMCDPort(::1, 44321) ...
> auxconnect.c:__pmGetAddrInfo: getaddrinfo(::1, ...) -> -9 Address family for hostname not supported
> auxconnect.c:__pmHostEntFree(hostent=0x1507780) name=(nil) ((null)) addresses=(nil)
> auxconnect.c:__pmGetAddrInfo(::1) -> NULL
> auxconnect.c:__pmAuxConnectPMCDPort(::1, 44321) : hosterror=0, ``Resolver Error 0 (no error)''
> __pmConnectPMCD(::1): pmcd connection port=44321 failed: No route to host
> pmNewContext(1, [::1]) -> -113, curcontext=-1
> pminfo: Cannot connect to PMCD on host "[::1]": No route to host
>
So, the relevant code is
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
#ifdef HAVE_AI_ADDRCONFIG
hints.ai_flags = AI_ADDRCONFIG; /* Only return configured address
types */
#endif
sts = getaddrinfo(hostName, NULL, &hints, &hostEntry->addresses);
According to the man page for getaddrinfo(3) on my system (Fedora 24),
setting AI_ADDRCONFIG in hints.ai_flags returns IPv4/IPv6 addresses only
if at least one IPv4/IPv6 address is configured on the system. It also
says that the loopback address is *not* considered a configured address
for this purpose.
So perhaps we should not be setting AI_ADDRCONFIG here?
Dave