Bug 435563 - Should getaddrinfo()'s AI_ADDRCONFIG flag ignore loopback interfaces?
Should getaddrinfo()'s AI_ADDRCONFIG flag ignore loopback interfaces?
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-03-01 13:40 EST by Sam Varshavchik
Modified: 2008-03-12 22:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-12 22:53:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sam Varshavchik 2008-03-01 13:40:22 EST
Description of problem:

On a host with IPV4-only interfaces, getaddrinfo() still returns AF_INET6
addresses even if the AI_ADDRCONFIG flag is specified.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

1. Invoke getaddrinfo() to look up a hostname with both AF_INET and AF_INET6
addresses, on a host that has only IPv4 connectivity.

Actual results:

getaddrinfo() will return both IPv6 and IPv4 addresses.

Expected results:

Only IPv4 addresses should be returned.

Additional info:

This is because in Fedora, the loopback interface is set up with the IPv6
loopback address ::1, in addition to As such, getaddrinfo() thinks
that the host has IPv6 connectivity. Essentially, the AI_ADDRCONFIG flag is
always ignored.

Given the intent of the AI_ADDRCONFIG flag, getaddrinfo() should skip loopback
interfaces, when evaluating the AI_ADDRCONFIG flag.
Comment 1 Ulrich Drepper 2008-03-12 22:53:19 EDT
Loopback addresses are ignored for some time now.

Note You need to log in before you can comment on or make changes to this bug.