Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 58410 - /bin/ipcalc input bugs
/bin/ipcalc input bugs
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-01-15 21:26 EST by Steve Bonneville
Modified: 2014-03-16 22:25 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-24 01:58:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Bonneville 2002-01-15 21:26:02 EST
Three related input parsing bugs with /bin/ipcalc:

1) CIDR short-form.

If a user attempts to use ipcalc by specifying a network/prefix pair (i.e.,
10/8) rather than ip-address/prefix (i.e., strange results may

                network (-n)    broadcast (-b)         (CORRECT)
 172/8           (INCORRECT)          (CORRECT)
 172.16/16           (INCORRECT)           (CORRECT)
 172.16.10/24            (INCORRECT)

Either ipcalc should compute addresses in network/prefix correctly, or it should
reject input in that form.

2) Input checking: CIDR prefix *and* netmask!

Only the -m option complains if a user attempts to give both a CIDR prefix *and*
a subnet mask on the command line.  If the input is so perverse that they
*differ*, the subnet mask takes precedence.

 # ipcalc -n
 # ipcalc -b
 # ipcalc -p

This input should be rejected outright.

3) (cosmetic bug) ipcalc <IPaddress>/<prefix> silence.

If ipcalc is given an ip-address/prefix but no options, nothing happens. 
If it's given an ip-address and netmask but no options, the usage message is

The usage message should be output in both circumstances.
Comment 1 Bill Nottingham 2002-04-12 18:54:37 EDT
Fixed in 6.63-1.

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