RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1053098 - ipcalc netmask handling is invalid
Summary: ipcalc netmask handling is invalid
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Jan Ščotka
URL:
Whiteboard:
Depends On:
Blocks: 1138717
TreeView+ depends on / blocked
 
Reported: 2014-01-14 16:46 UTC by vlad.halilov
Modified: 2016-11-25 13:05 UTC (History)
1 user (show)

Fixed In Version: initscripts-9.03.42-1.el6
Doc Type: Bug Fix
Doc Text:
In ipcalc allow specifing netmask in "check" mode and be more strict when parsing netmask (previously non-numeric characters were skipped, now we reprot that as incorrect value).
Clone Of:
: 1138717 (view as bug list)
Environment:
Last Closed: 2014-10-14 06:27:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1448 0 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2014-10-14 01:05:44 UTC

Description vlad.halilov 2014-01-14 16:46:51 UTC
Description of problem:
ipcalc utils handling netmask parameters incorrectly with '-c' option. one problem: ignoring invalid cidr, second - not accepting netmask in format allowed by manual.

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


How reproducible:

problem one:
Steps to Reproduce:
1. ipcalc -c 128.34.34.2/FF;echo $?

Actual results:
not output
error code: 0

Expected results:
invalid mask, non-zero error code

and second:
Steps to Reproduce:
1. ipcalc -c 128.34.34.2 255.255.255.0

Actual results:

ipcalc: unexpected argument: 255.255.0.0
Usage: ipcalc [OPTION...]
  -c, --check         Validate IP address for specified address family
  -4, --ipv4          IPv4 address family (default)
  -6, --ipv6          IPv6 address family
  -b, --broadcast     Display calculated broadcast address
  -h, --hostname      Show hostname determined via DNS
  -m, --netmask       Display default netmask for IP (class A, B, or C)
  -n, --network       Display network address
  -p, --prefix        Display network prefix
  -s, --silent        Don't ever display error messages

Help options:
  -?, --help          Show this help message
  --usage             Display brief usage message

error code: 1


Expected results:

no ouput. error code zero.

Additional info:

Comment 2 Lukáš Nykrýn 2014-01-15 12:58:12 UTC
Thanks for the report, this should be fixed.

Comment 6 errata-xmlrpc 2014-10-14 06:27:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1448.html


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