Bug 518600 - /etc/sysconfig/network-scripts/ifup-eth ignores if HWADDR doesn't match any mac address
Summary: /etc/sysconfig/network-scripts/ifup-eth ignores if HWADDR doesn't match any m...
Status: CLOSED DUPLICATE of bug 487718
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.3
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: initscripts Maintenance Team
QA Contact: BaseOS QE
Depends On:
TreeView+ depends on / blocked
Reported: 2009-08-21 08:26 UTC by Jonathan Beckman
Modified: 2009-08-21 14:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-08-21 14:45:33 UTC

Attachments (Terms of Use)

Description Jonathan Beckman 2009-08-21 08:26:13 UTC
Description of problem:
ifup-eth doesn't properly handle the case where a mac-address can't be found, this occurs if you have replaced the network card.

relevant section from ifup-eth0:
# remap, if the device is bound with a MAC address and not the right device num
# bail out, if the MAC does not fit
if [ -n "${HWADDR}" ]; then
    if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
        curdev=`get_device_by_hwaddr ${HWADDR}` # Returns empty if $HWADDR can't be found
        if [ -n "$curdev" ]; then # Returns false since $HWADDR is empty,  
	  rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || {
	    echo $"Device ${DEVICE} has different MAC address than expected, ignoring." # This else clause should be moved up to the if statemetn
	    exit 1

How reproducible:
1. ifdown $if
2. edit config, change HWADDR to a nonexisting mac address on the system.
3. ifup $if # Should scream about mac address not found

Actual results:
Interface goes up

Expected results:
Should not go up.

Additional info:
Tested on 5.2 and 5.3

Comment 1 Bill Nottingham 2009-08-21 14:45:33 UTC

*** This bug has been marked as a duplicate of bug 487718 ***

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