Bug 843051

Summary: getaddrinfo() fails to parse IPv6 addresses on hosts without global IPv6
Product: [Fedora] Fedora Reporter: Pavel Šimerda (pavlix) <psimerda>
Component: glibcAssignee: Jeff Law <law>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: fweimer, jakub, law, pfrankli, schwab
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-25 14:00:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Šimerda (pavlix) 2012-07-25 12:31:35 UTC
Hi,

I've just stumbled upon a nasty bug in the getaddrinfo function that most problably started as a workaround for misconfigured IPv6 hosts. Unfortunately
it affects more than just DNS resolution, it also affects literal IPv6 addresses.

IPv6's core feature is support for link-local addresses (fe80::/64) and a node-local address (::1) that work *without global connectivity*. IPv4 hosts also have a node-local address (127.0.0.1) and may occasionaly use link-local addresses (169.254.x.y).

These scoped addresses don't work on hosts without global IPv6 addresses.

glibc-2.15-37.fc17.x86_64


How reproducible: always

Steps to Reproduce:
1. Disconnect from any IPv6 networks
2. Remove any global IPv6 addresses (ip -6 address flush scope global)
3. Make sure SSH server is turned on (you can use other services, too)
4. Connect: ssh ::1
5. Add a global address (ip a a 2001:db8::890 dev lo)
6. Connect again: ssh ::1
  
Actual results:

4: RTNETLINK answers: Cannot assign requested address
6: success

Expected results:

4. success
6. success

Comment 1 Jeff Law 2012-07-25 14:00:49 UTC

*** This bug has been marked as a duplicate of bug 808147 ***