Bug 75572 - nameif fails but exits with zero code
Summary: nameif fails but exits with zero code
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: net-tools
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-09 22:25 UTC by diego.santacruz
Modified: 2015-03-05 01:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-20 12:33:18 UTC
Embargoed:


Attachments (Terms of Use)

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


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