Bug 58852

Summary: /etc/hosts entries not honoured before DNS lookups
Product: [Retired] Red Hat Linux Reporter: Jeremy Laidman <jlaidman>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-25 21:24:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeremy Laidman 2002-01-25 21:24:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)

Description of problem:
Using telnet or ssh to a host which is named in /etc/hosts causes the
client to perform a DNS lookup for the name.  This includes
"localhost".  host.conf says "order hosts, bind"; nsswitch.conf says
for hosts: "files nisplus dns".  /etc/hosts says
"127.0.0.1 localhost.localdomain localhost".  strace and ltrace tell
me that it's using lib_files, then lib_nisplus, then lib_dns.

When I take dns out of nsswitch, it resolves quickly.


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


How reproducible:
Always

Steps to Reproduce:
1.type "telnet localhost" - takes a long time to respond
2.copy telnet from (say) mandrake 7.2, same command comes back straight away
3.
	

Actual Results:  slow lookup with DNS traffic for entries in /etc/hosts

Expected Results:  instant lookup for entries in /etc/hosts

Additional info:

Comment 1 Jakub Jelinek 2002-01-27 10:25:08 UTC

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