Bug 122479 - ipcalc failes to find hosnames for addresses
Summary: ipcalc failes to find hosnames for addresses
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-04 23:36 UTC by Michal Jaegermann
Modified: 2014-03-17 02:44 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2004-05-05 01:22:36 UTC


Attachments (Terms of Use)

Description Michal Jaegermann 2004-05-04 23:36:34 UTC
Description of problem:

I am not so sure if this the right spot to complain about but
the problem easily can be demonstrated with ipcalc.

On two installations of FC2T3, one i386 and one x86_64, both have

hosts:      files dns

in /etc/nsswitch.conf and 'order hosts,bind' in /etc/host.conf
and a line like this

192.168.23.196  dyna4.home.front dyna4

in /etc/hosts. On i386 installation one gets:

$ ipcalc -h 192.168.23.196
HOSTNAME=dyna4.home.front

but for x86_64 the same action results in

$ ipcalc -h 192.168.23.196
ipcalc: cannot find hostname for 192.168.23.196: Unknown host

and similar for any other entry listed in /etc/hosts.

Checking with 'strace -e open ...' on i386 one can observe:

# strace -e open ipcalc -h 192.168.23.196
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
open("/etc/popt", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
open("/root/.popt", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or
directory)
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libnss_files.so.2", O_RDONLY) = 3
open("/etc/resolv.conf", O_RDONLY)      = 3
open("/etc/host.conf", O_RDONLY)        = 3
open("/etc/hosts", O_RDONLY)            = 3
HOSTNAME=dyna4.home.front

but on x86_64 the same action results in

# strace -e open ipcalc -h 192.168.23.196
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/tls/libc.so.6", O_RDONLY)  = 3
open("/etc/popt", O_RDONLY)             = -1 ENOENT (No such file or
directory)
open("/root/.popt", O_RDONLY)           = -1 ENOENT (No such file or
directory)
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libnss_files.so.2", O_RDONLY) = 3
open("/etc/resolv.conf", O_RDONLY)      = 3
open("/etc/host.conf", O_RDONLY)        = 3
open("/etc/hosts", O_RDONLY)            = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib64/libnss_dns.so.2", O_RDONLY) = 3
open("/lib64/libresolv.so.2", O_RDONLY) = 3
ipcalc: cannot find hostname for 192.168.23.196: Unknown host

It looks like that /etc/hosts is opened but its content discarded.

As a side-effect x86_64 machines with dynamically asigned IP addresses
end up with 'localhost.localdomain' for names.

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

How reproducible:
Always

Comment 1 Bill Nottingham 2004-05-05 01:22:36 UTC
Fixed in 7.52-1, *grumble*.

/me goes looking for an RFC to whack someone with


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