Re: seeking help with ipv6 qa failures
"Ken McDonell" <[email protected]> Thu, 26 Jan 2017 06:35:00 +1100
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Message-ID | <[email protected]> |
On 26/01/17 04:31, Dave Brolley wrote:
> ...
> 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?
Good catch Dave.
On this machine HAVE_AI_ADDRCONFIG is 1. When I change the libpcp code so that AI_ADDRCONFIG is not set, then ...
kenj@vm00:~/src/pcp/src/libpcp/src$ pminfo -h 'pcp://[::1]' -f pmcd.feature.ipv6
pmcd.feature.ipv6
value 1
kenj@vm00:~/src/pcp/src/libpcp/src$ pminfo -h '[::1]' -f pmcd.feature.ipv6
pmcd.feature.ipv6
value 1
which is correct.
So the question becomes, when (if ever) should AI_ADDRCONFIG be set in hints.ai_flags?
Given that the default hints are AI_V4MAPPED | AI_ADDRCONFIG for current glibc versions (which is different to POSIX), I would be nervous about changing the libpcp code unconditionally.
Pro tem, I'm much more inclined to notrun the failing QA test on just this platform, as (a) this test passes everywhere else, and (b) I can't immediately see any other QA tests that are seeing a related failure on this platform (vm00).
Cheers and thanks.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#15033): https://groups.io/g/pcp/message/15033
View All Messages In Topic (10): https://groups.io/g/pcp/topic/4244556
Mute This Topic: https://groups.io/mt/4244556?uid=174580
New Topic: https://groups.io/g/pcp/post
-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-
Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580
Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]
Terms of Service: https://groups.io/static/tos
Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy
-=-=-=-=-=-=-=-=-=-=-=-