Bug 843051 - getaddrinfo() fails to parse IPv6 addresses on hosts without global IPv6
Summary: getaddrinfo() fails to parse IPv6 addresses on hosts without global IPv6
Keywords:
Status: CLOSED DUPLICATE of bug 808147
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Law
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-25 12:31 UTC by Pavel Šimerda (pavlix)
Modified: 2016-11-24 15:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-25 14:00:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


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