Bug 549892
| Summary: | glibc default address selection policy should prefer ipv4 addresses | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jason Merrill <jason> |
| Component: | glibc | Assignee: | Andreas Schwab <schwab> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 11 | CC: | drepper, jakub, kdudka, schwab |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-01-25 17:18:00 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jason Merrill
2009-12-22 22:25:25 UTC
Hmm, the gai.conf precedence lines from the man page adjusted as suggested in 10.3 of the RFC don't produce the desired result for me:
precedence ::1/128 50
precedence ::/0 40
precedence 2002::/16 30
precedence ::/96 20
precedence ::ffff:0:0/96 100
and curl/firefox are still trying the ipv6 address first, even after a reboot.
There's also a typo ("precendence") in those lines in the man page, but I get the same behavior with either spelling (or with no gai.conf).
What do you get from getent ahosts fedoraproject.org? 2610:28:200:1::fed0:1 STREAM fedoraproject.org 2610:28:200:1::fed0:1 DGRAM 2610:28:200:1::fed0:1 RAW 66.35.62.162 STREAM 66.35.62.162 DGRAM 66.35.62.162 RAW 80.239.156.214 STREAM 80.239.156.214 DGRAM 80.239.156.214 RAW 152.46.7.221 STREAM 152.46.7.221 DGRAM 152.46.7.221 RAW You need to fix your network configuration, glibc is following RFC 3484. Regardless of the default, surely gai.conf should work as documented? From /usr/share/doc/glibc-common*/gai.conf: # For sites which prefer IPv4 connections change the last line to # precedence ::ffff:0:0/96 100 ...but this doesn't work. If you are behind a NAT you need to adjust the scope table so that your interface address is no longer classified as link-local. Otherwise a global scope address will never match. I have no idea how to do that, and it seems rather unfortunate to require users in an extremely common situation (i.e. behind a consumer-level NAT router) to jump through so many hoops to get basic functionality to work properly. |