Bug 126525

Summary: ifdown hangs when using different pcmcia cards; ifup to blame?
Product: [Fedora] Fedora Reporter: Jim Martino <jrm>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 2CC: mattdm, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-26 18:28:41 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 Jim Martino 2004-06-22 20:46:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
Original symptoms were problems booting/shutting down; on boot, pcmcia
start would hang. On shutting down, network stop would hang on
bringing down the wireless ethernet interface. This occurred only when
using a different interface card than specified in the network
configuration.
Problem traced to infinite recursion of /sbin/ifdown due to a test
block around line 60:

if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
    FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
    if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
        NEWCONFIG=`fgrep -il "HWADDR=${HWADDR}"
/etc/sysconfig/network-scripts/ifcfg-*`
        if [ -n "${NEWCONFIG}" -a "${NEWCONFIG}" != "${CONFIG}" ]; then
           exec /sbin/ifdown ${NEWCONFIG}
        else
           echo $"Device ${DEVICE} has different MAC address than
expected, ignoring."
           exit 1
        fi
    fi
fi


Cause of the problem in this script is that if a network card with a
different HW address than in the configs is used, then the inner test
succeeds recursively. 

Looking at ifup seems to indicate that this condition should not be
reached, as the ifup script should check that the HW address of the
card matches the specified address in the configuration - this is
probably the real cause of the problem. I haven't figured out why ifup
doesn't succeed at this though.


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

How reproducible:
Always

Steps to Reproduce:
1. Configure a wireles interface using the appropriate MAC address
2. Use a different card of the same type to bring up the interface
(For me, it was 2 orinoco gold cards)
3. Unplug the card, or try to shutdown.
    

Actual Results:  After unplugging the card, top showed ifdown hanging.

Expected Results:  Depends on what the design was - I suppose that
ifup should have stopped the interface from coming up in the first
place, so this result should not have been reached at all.

Additional info:

Comment 1 Matthew Miller 2005-04-26 16:17:06 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 2 Bill Nottingham 2005-04-26 18:28:41 UTC
I *believe* this is fixed in the current rawhide initscripts. Please try with
8.08-1 or so.