Bug 135125 - telnet: 0: Name or service not known
Summary: telnet: 0: Name or service not known
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc   
(Show other bugs)
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-08 20:34 UTC by Mike Batchelor
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-18 13:59:56 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:256 high SHIPPED_LIVE Low: glibc security update 2005-05-18 04:00:00 UTC

Description Mike Batchelor 2004-10-08 20:34:36 UTC
Description of problem: "telnet 0 25" does not connect to
localhost:25. Instead it throws an error "0: Name or service no known".

Version-Release number of selected component (if applicable):
telnet-0.17-26.i386.rpm

How reproducible: fails every time


Steps to Reproduce:
1. telnet 0 25
2. weep
3. weep some more
  
Actual results:
telnet: 0: Name or service not known

Expected results:
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.
220 hostname ESMTP Sendmail 8.12.10/8.12.10; Fri, 8 Oct 2004 13:36:17
-0700

Additional info:
For the past - Oh, I don't know, two decades? - 0 resolves to
127.0.0.1, and so "telnet 0 25" would connect to the local machine's
smtp server, or "telnet 0 80" connects to the local HTTP server.  Not
so in RHEL3.  WTF?

Comment 1 Harald Hoyer 2004-10-11 08:31:27 UTC
please provide:
$ which telnet
and do you have ipv6 enabled?

Comment 2 Mike Batchelor 2004-10-11 16:42:25 UTC
ipv6 is not enabled.  Turns out the telnet in my path was
/usr/kerberos/bin/telnet, but /usr/bin/telnet returns the same error.
I believe this is not a bug in telnet after all, but glibc's
gethostbyname().  In fact, it looks like this was broken intentionally
in the glibc 2.3 series, for some reason.  gethostbyname() no longer
resolves undotted decimal addresses, or hexadecimal or octal
addresses.  It used to, but not anymore. "telnet 0 25" is one of the
casualties.

Comment 4 Jakub Jelinek 2005-01-20 11:30:41 UTC
Both gethostname ("0") and getaddrinfo ("0", NULL, NULL, &res);
return the same thing as they used to.
So the change is not in glibc.

Comment 5 Harald Hoyer 2005-01-20 11:36:31 UTC
well, nothing change in the source code of telnet

Comment 6 Harald Hoyer 2005-01-20 12:41:59 UTC
Retested. Works for me on a RHEL3-U3...

Comment 7 Harald Hoyer 2005-01-20 12:44:07 UTC
doh... fell in the trap... tested with /usr/kerberos/bin/telnet (which works)
/usr/bin/telnet failed like described in the bug report.

Comment 8 Harald Hoyer 2005-01-20 12:57:49 UTC
With a RHEL3-U4 glibc:

getaddrinfo("0", "25", 0xbfffe250, 0xbfffd9e4)   = -2
gai_strerror(-2)                                 = "Name or service not known"


Comment 9 Jakub Jelinek 2005-01-20 16:38:31 UTC
Ok, this seems to be http://sources.redhat.com/bugzilla/show_bug.cgi?id=296


Comment 10 Jakub Jelinek 2005-02-15 06:49:36 UTC
Should be fixed in glibc-2.3.2-95.32.

Comment 11 Tim Powers 2005-05-18 13:59:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-256.html



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