Bug 53929 - long delays connecting if host does not resolve via DNS, even if in /etc/hosts
Summary: long delays connecting if host does not resolve via DNS, even if in /etc/hosts
Status: CLOSED DUPLICATE of bug 57998
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2001-09-21 20:49 UTC by John Hardin
Modified: 2016-11-24 15:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-12-13 20:11:12 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to optionally disable DNS lookups (3.01 KB, patch)
2001-12-13 09:50 UTC, panu.matilainen
no flags Details | Diff

Description John Hardin 2001-09-21 20:49:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4+) Gecko/20010914

Description of problem:
When attempting to connect by name using telnet 0.17.6x-18 there are
very long delays before anything is displayed, including the "Trying
{ipaddr}..." message.
The destination computer name is in /etc/hosts, and /etc/host.conf states
"order hosts,bind", yet it appears that telnet is still trying a DNS
lookup, which for the host in question will not work.
Attempting to connect by IP address immediately connects.
Is telnet ignoring /etc/host.conf for some reason?

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

How reproducible:

Steps to Reproduce:
1. place host name in /etc/hosts - host must not resolve via DNS
2. verify /etc/host.conf contains "order hosts,bind"
3. run "telnet {hostname}"

Actual Results:  Long delay, eventual connect.

Expected Results:  Immediate connect.

Comment 1 John Hardin 2001-09-21 23:45:54 UTC
New info: now I am seeing the delay on "telnet {ipaddr}" - what the heck could
cause *that*?

Comment 2 John Hardin 2001-11-05 22:08:53 UTC
So, any progress on figuring out what the heck is going on here?

Comment 3 panu.matilainen 2001-12-13 09:50:19 UTC
Created attachment 40471 [details]
Patch to optionally disable DNS lookups

Comment 4 panu.matilainen 2001-12-13 09:51:04 UTC
I've noticed the same thing here... (on RH7.1 & 7.2) My "fix" is the attached
patch which adds a new argument -N to optionally disable DNS-lookups. And I
wouldn't mind at all if this showed up in the next RH telnet package :)

Comment 6 panu.matilainen 2001-12-13 14:15:14 UTC
BTW I'm not talking about localhost here but something that doesn't exist in DNS
at all. Also I found out that the kerberos-version of telnet doesn't seem to
make a DNS-lookup if it's given an IP instead of a hostname.

Comment 7 John Hardin 2001-12-13 16:44:51 UTC
Er, apparently nobody there has twigged to this yet:

I only got wind of this a couple of days ago, and thought it'd be known to the
telnet maintainers, so I didn't post anything.

The bug is that telnet is now trying IPv6 lookups even though an IPv4 hostname
is in the local hosts file.

If there is an IPv4 entry in /etc/hosts for the system name, an IPv6 DNS lookup
Okay, now that we know what is happening - when can we expect a fix? :)

Comment 8 John Hardin 2001-12-13 20:11:07 UTC
It seems telnetd may also be subject to this bug...

Comment 9 Pekka Savola 2002-01-18 08:04:21 UTC
The best fix for RHL62 errata (where IPv6 was not supported yet) is to change
the reference
from PF_UNSPEC to PF_INET.  Then getaddrinfo defaults to IPv4 lookups first. 
(perhaps this should be filed against telnet separately.)

Anyway, marking this as a duplicate of a latter report on the same subject.

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

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