Bug 59057 - Get "Name or service not known" for correct hostname usinfg ftp (and telnet)
Summary: Get "Name or service not known" for correct hostname usinfg ftp (and telnet)
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL: ftp://ftp.perl.org
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-30 04:59 UTC by Jean-Francois Pirus
Modified: 2016-11-24 15:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-22 02:49:16 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jean-Francois Pirus 2002-01-30 04:59:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.7) Gecko/20011221

Description of problem:
When trying to ftp to ftp.perl.org, you get the following error:
Name or service not known.
Doing an nslookup and ftp'ing to the ip address works.
The bug might be related to the glibc bug 2832.

Basically using gethostbyname() works, which is what ftp.c in netkit-ftp-0.17 does. 
The netkit-ftp.usagi-ipv6.patch (from ftp-0.17-12.src.rpm) switches to using
getaddrinfo() with a PF_UNSPEC (0) parameter which make it search IPv6 the IPv4.
Changing the parameter to AF_INET fixes the problem but disables IPv6 lookups.

telnet has the same behaviour.
It could be related to the length of the A record the CNAME points to
or the fact that it's a double CNAME indirection.

ftp.perl.org    canonical name = ftp.perl.org.develooper.com.
ftp.perl.org.develooper.com     canonical name = ftp.cpan.ddns.develooper.com.
Name:   ftp.cpan.ddns.develooper.com


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


How reproducible:
Always

Steps to Reproduce:
1.ftp ftp.perl.org
2.
3.
	

Additional info:

Comment 1 Bernhard Rosenkraenzer 2002-01-30 10:39:44 UTC
The code seems correct; assigning to glibc. 
 
Jakub: 
http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=default&cmd=view+audit-trail&cmd=view&pr=2832 
has a test case

Comment 2 Ulrich Drepper 2003-04-22 02:49:16 UTC
This definitely works for me on RHL9.  If you still have a problem after
updating to RHL9 please open a bug for RHL9.


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