Bug 133445 - ipcalc --hostname fails on x86_64
ipcalc --hostname fails on x86_64
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: initscripts (Show other bugs)
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:
Last Closed: 2004-12-21 09:33:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:511 normal SHIPPED_LIVE Updated initscripts package 2004-12-21 00:00:00 EST

  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):


How reproducible:


Steps to Reproduce:

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

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.


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