Fix Network Name Resolution
IPv4 and IPv6 host/service name resolution doesn't work very well in Fedora. The
getaddrinfo() function in glibc returns wrong results in many cases. This feature aims to fix a bunch of name resolution bugs in glibc that prevent applications from fully using name resolution functions without doing a bunch of workaround.
- Name: Pavel Šimerda
- Email: psimerda at redhat.com
- Name: David Jaša
- Email: djasa at redhat.com
- Name Tore Anderson
- Email: tore at fud.no
- Targeted release: Fedora 19
- Last updated: 2013-01-15
- Percentage of completion: 10%
getaddrinfo() function doesn't work as it was desinged. Many of its features are buggy and cannot be used without extensive workarounds. Many software packages are using
getaddrinfo() with such workarounds. Many can trigger its failures. And many packages that don't use
getaddrinfo() will be ported in the near future.
We are submitting this bug fixing effort as a Feature because:
- It is a high-impact change that will (positively) affect allmost all networking software
- Developers will be able to use
getaddrinfo()without ugly workarounds for new code
- We are going to publish guidelines for proper
- Documentation for
getaddrinfo()bugs and possible workarounds will be available to help maintaining backward compatibility
- Comments and errata will be sent to standards organizations
- We want to recieve critical response during the whole process
The behavior of
getaddrinfo() is often nonstandard, undocumented, surprising, or just plain wrong. We already indentified a number of problems. The most prominent examples are here.
getaddrinfo()may return duplicate or even wrong addresses from /etc/hosts
getaddrinfo()with NULL servname may return duplicate addresses
getaddrinfo()with AI_PASSIVE may still address list not suitable for
getaddrinfo()with AI_ADDRCONFIG may fail to translate literal addresses
getaddrinfo()with AI_ADDRCONFIG may fail to resolve /etc/hosts addresses
getaddrinfo()with AI_ADDRCONFIG may send unwanted AAAA queries
getaddrinfo()has a bad choice of default flags
Whether or not the problematic actually occurs depends on
getaddrinfo() input parameters, runtime kernel network interface configuration, and more. While testing the known bugs or reading the source code, more and more bugs are discovered.
Bug reports related to
getaddrinfo() can be found upstream:
The above problems affect software that wants to use
- Get parameters for
sendto()to start communicating
- Get parameters for
bind()to listen on specific addresses
- Build IP address based accesslists
- Perform name resolution for other purposes
Although it would be nice to also test and fix all software in Fedora using
getaddrinfo(), that is not feasible. Therefore we are going to concentrate on checking and fixing the GNU C library, checking and fixing the most important toolkits dealing with networking, and documenting a set of guidelines for daemons and application software.
Fedora bugs related to dualstack networking including name resolution problems should be added to the following tracker bug:
Benefit to Fedora
One of Fedora's goals is to be a modern linux distribution that will work in modern environments. For this to be achieved, proper IPv4-only support and proper dualstack support is a MUST. IPv6-only use cases are rare but may become more common at any time. It's better to be prepared for those, too.
Application software used on day-to-day basis should be correctly handling IPv4-only, IPv6-only and dualstack use cases.
- glibc: name resolution must work properly
- glib: provides networking API for applications
Note: Network configuration tools are out of scope of this feature. Network testing tools were moved to a separate feature page. See Networking#Fedora_feature_pages for other network-related features.
How to test
This is the most difficult part. We are going to combine the following approaches to testing:
- Everyday use of Fedora in various network environments
- Testing the tracked bug reports
- Specific tests, e.g. for
getaddrinfo()and glib API
Users currently experience networking problems in various environments even during the most basic use of their system because of principal problems in the distribution. These problems would go away.
This feature is about fixing all important parts of the distribution. We do not expect the required changes to negatively affect the rest of the packages. But if any problems occur, we are ready to help fixing them before the respective version is released. As a last resort, any problematic change can be reverted.
Dualstack networking is fully supported and glibc and other packages will be tested for not including fundamental design flaws and important bugs regarding IPv4 and IPv6 support.