Bug 118249 - ifdown performs case sensitive comparison on FOUNDMACADDR and HWADDR, but it should ignore case when comparing them
ifdown performs case sensitive comparison on FOUNDMACADDR and HWADDR, but it ...
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2004-03-14 10:28 EST by Pavel Tsekov
Modified: 2014-03-16 22:43 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-15 11:45:23 EST
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 Pavel Tsekov 2004-03-14 10:28:22 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
/etc/sysconfig/network-scripts/ifdown, line 55:

if [ -n "${HWADDR}" ]; then
    FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \
        sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'`
    if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then

The 'ip' command returns the MAC address in lower case, so if someone 
sets the value of HWADDR in his ifcfg-* in upper case the check above 
will fail.

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

How reproducible:

Steps to Reproduce:
1. Set the value of HWADDR in your ifcfg-eth0 (for example)
   to contain uppercase characters.

2. ifup eth0

3. ifdown eth0

Actual Results:  An error is detected and the following message is 

 "Device eth0 has different MAC address than expected, ignoring.

Expected Results:  ifdown should bring the interface down.

Additional info:
Comment 1 Bill Nottingham 2004-03-15 11:45:23 EST
This is fixed in current releases, such as RHEL 3 or Fedora Core 1.

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