Bug 10859 - getent hosts doesn't search ipv4 when ipv6 is configured
Summary: getent hosts doesn't search ipv4 when ipv6 is configured
Status: RESOLVED INVALID
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-28 14:45 UTC by Matus UHLAR - fantomas
Modified: 2014-07-01 05:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matus UHLAR - fantomas 2009-10-28 14:45:49 UTC
when host has AAAA record, getent hosts only resolves that one, not the A records:

% getent hosts www.uniqueflooring.sk.
2001:1ba0:2a0:5965::20:1 www.uniqueflooring.sk

% host www.uniqueflooring.sk.
www.uniqueflooring.sk has address 217.67.30.20
www.uniqueflooring.sk has IPv6 address 2001:1ba0:2a0:5965::20:1

imho it should look and report A records too...
Comment 1 Ulrich Drepper 2009-10-28 15:02:49 UTC
That's why there is getent ahosts ...
Comment 2 Matus UHLAR - fantomas 2009-10-28 15:35:10 UTC
I'm using getent hosts in script(s) since it's the easiest tool to do this job. 

getent ahosts has totally different output and doesn't return the ipv6 address
on all systems (checked gentoo linux glibc 2.6.1 x86_64, suse linux glibc 2.4
x86_64). If you don't find even this a bug, I'm sorry.