Red Hat Bugzilla – Bug 133445
ipcalc --hostname fails on x86_64
Last modified: 2014-03-16 22:48:36 EDT
Description of problem:
On x86_64, 'ipcalc --hostname' will fail when trying to pull an entry
Version-Release number of selected component (if applicable):
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.
Created attachment 104241 [details]
A patch to fix ipcalc
Created attachment 104244 [details]
a patch that fixes this, and various other bogons
Try this - it's a backport of the fixes from Fedora.
This patch fixes the problem I reported.
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.