Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 75572

Summary: nameif fails but exits with zero code
Product: [Retired] Red Hat Linux Reporter: diego.santacruz
Component: net-toolsAssignee: Phil Knirsch <pknirsch>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: jeremyp, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-20 12:33:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description diego.santacruz 2002-10-09 22:25:27 UTC
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 16:55:40 UTC
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 12:33:18 UTC
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