Bug 75572 - nameif fails but exits with zero code
nameif fails but exits with zero code
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-09 18:25 EDT by diego.santacruz
Modified: 2015-03-04 20:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-20 08:33:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description diego.santacruz 2002-10-09 18:25:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020809

Description of problem:
If nameif is given a MAC address that does not match any present interface it
will fail but exit with a zero code

Version-Release number of selected component (if applicable):
net-tools-1.60-7

How reproducible:
Always

Steps to Reproduce:
1. put a network card with say MAC address 00:10:a4:04:5d:25
2. do 'nameif 00:01:02:03:04:05 eth2' (note non-present MAC address)
3.
	

Actual Results:  nameif fails (as it should) but the exit code is zero.
In addition the message is misleading (interface 'eth2' not found)

Expected Results:  Fail and exit with a non-zero code.
Print a sane error message (MAC address '00:01:02:03:04:05' not found)

Additional info:

This bug affects the ifup script. See bug #75570
Comment 1 James Pattie 2003-05-06 12:55:40 EDT
According to the command you specified, you are trying to specify the
"interface" to be the mac address you specified.

nameif -h gives:

usage: nameif [-c configurationfile] [-s] {ifname macaddress}
Comment 2 Phil Knirsch 2004-04-20 08:33:18 EDT
nameif returns an error when a "real" error has happend. Specifying an
interface/MAC address that doesn't exist doesn't count as an error but
as a misconfiguration, so no error is reported.

Read ya, Phil

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