Bug 133445 - ipcalc --hostname fails on x86_64
Summary: ipcalc --hostname fails on x86_64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: initscripts
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 123574
TreeView+ depends on / blocked
 
Reported: 2004-09-24 01:24 UTC by Sean Dilda
Modified: 2014-03-17 02:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-21 14:33:02 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:511 0 normal SHIPPED_LIVE Updated initscripts package 2004-12-21 05:00:00 UTC

Description Sean Dilda 2004-09-24 01:24:06 UTC
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-24 01:25:34 UTC
Created attachment 104241 [details]
A patch to fix ipcalc

Comment 2 Bill Nottingham 2004-09-24 03:46:05 UTC
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 13:05:06 UTC
This patch fixes the problem I reported.

Comment 5 John Flanagan 2004-12-21 14:33:02 UTC
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.