Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#23053 - [glibc] getaddrinfo() returns IPv4 addresses instead of IPv4-mapped IPv6 addresses

Attached to Project: Arch Linux
Opened by Andrej Podzimek (andrej) - Friday, 25 February 2011, 22:43 GMT
Last edited by Allan McRae (Allan) - Monday, 14 March 2011, 13:36 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

getaddrinfo() returns IPv4 addresses instead of IPv4-mapped IPv6 addresses (when AI_V4MAPPED|AI_ALL is set), despite the AF_INET6 family requirement in the hints structure.

The attached file (gaitest.c) is a trivial test case that exhibits this bug. Try ./gaitest some.ipv4.host. It will return IPv4 addresses instead of the requested IPv4-mapped IPv6 addresses. This contradicts the information in the man page.

This issue has existed for >1 year, AFAIK. However, it became more obvious in some pieces of code I currently work with. Applications that simply rely on the address type being always AF_INET6 (as promised by the man page) can have weird issues and crashes caused by this non-standard getaddrinfo() behavior.

Additional info:

* package version(s)

glibc 2.13-4
(The issue has existed for >1 year, AFAIK, so the exact glibc version may not matter.)

* config and/or log files etc.

Config files are listed in this bug's description: https://bugs.archlinux.org/task/23052
Identical files were used in this case. (And again, multiple versions of /etc/gai.conf, including an empty one, were tested.)

Steps to reproduce:

Resolve a host name that translates to (at least one) IPv4 address using the attached code snippet.
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 14 March 2011, 13:36 GMT
Reason for closing:  Upstream
Additional comments about closing:  Issue is reported upstream. Follow-up in their tracker.
Comment by Ionut Biru (wonder) - Friday, 25 February 2011, 23:37 GMT
you should really report your glibc bugs upstream. we do not modify the sources
Comment by Allan McRae (Allan) - Saturday, 26 February 2011, 00:18 GMT
This seems to be the upstream bug (files two years ago):
http://sourceware.org/bugzilla/show_bug.cgi?id=9981

Loading...