Bug 133445 - ipcalc --hostname fails on x86_64
ipcalc --hostname fails on x86_64
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: initscripts (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks: 123574
  Show dependency treegraph
 
Reported: 2004-09-23 21:24 EDT by Sean Dilda
Modified: 2014-03-16 22:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-21 09:33:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A patch to fix ipcalc (669 bytes, patch)
2004-09-23 21:25 EDT, Sean Dilda
no flags Details | Diff
a patch that fixes this, and various other bogons (3.39 KB, text/plain)
2004-09-23 23:46 EDT, Bill Nottingham
no flags Details

  None (edit)
Description Sean Dilda 2004-09-23 21:24:06 EDT
Description of problem:

On x86_64, 'ipcalc --hostname' will fail when trying to pull an entry
from /etc/hosts.

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

initscripts-7.31.16.EL-1


How reproducible:

Always


Steps to Reproduce:

Find a hostname that doesn't resolve on your system (ie 10.10.10.10)
Add a line like '10.10.10.10  foobar' to the bottom of your /etc/hosts
run 'ipcalc --hostname 10.10.10.10'

It should print out 'HOSTNAME=foobar'
However, it will give an error indicating it can't look up the hostname.

The bug comes from ipcalc using an unsigned long int when it should
use an in_addr_t.  I will attach a patch shortly.
Comment 1 Sean Dilda 2004-09-23 21:25:34 EDT
Created attachment 104241 [details]
A patch to fix ipcalc
Comment 2 Bill Nottingham 2004-09-23 23:46:05 EDT
Created attachment 104244 [details]
a patch that fixes this, and various other bogons

Try this - it's a backport of the fixes from Fedora.
Comment 3 Sean Dilda 2004-09-24 09:05:06 EDT
This patch fixes the problem I reported.
Comment 5 John Flanagan 2004-12-21 09:33:02 EST
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/RHBA-2004-511.html

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