Bug 332531 - ifconfig returns invalid exit code when incorrect netmask is given
ifconfig returns invalid exit code when incorrect netmask is given
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: net-tools (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Zdenek Prikryl
Depends On:
  Show dependency treegraph
Reported: 2007-10-15 10:16 EDT by Michal Marciniszyn
Modified: 2014-02-10 18:03 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-09-16 10:51:34 EDT
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 Michal Marciniszyn 2007-10-15 10:16:04 EDT
Description of problem:
If we try to change netmask of the interface and we choose incorrect one (i.e., ifconfig shows us warning, but exits with exit code 0.

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

How reproducible:

Steps to Reproduce:
ifconfig eth0 ip_addres netmask
echo $?
Actual results:

Expected results:
non-zero exit code

Additional info:
Comment 1 Zdenek Prikryl 2008-09-16 10:51:34 EDT
ifcondig uses ioct() to setting netmask. If ioctl() successes, then ifconfig returns 0. In this case, ioctl() really successes, so ifconfig returns zero. In my opinion this is not a bug but a feature.


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