Bug 132185 - Wireless card causes slowdown in boot when no accesspoint around
Summary: Wireless card causes slowdown in boot when no accesspoint around
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-09 18:56 UTC by Kevin DeKorte
Modified: 2014-03-17 02:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-30 21:52:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kevin DeKorte 2004-09-09 18:56:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040808 Firefox/0.9.3

Description of problem:
On a laptop with a wireless card and the card is enabled to become
active on boot. Booting can be significantly delayed as the card looks
for a dchp server when there is no accesspoint in the area. 

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

How reproducible:
Always

Steps to Reproduce:
1. Enable a wireless card to activate on boot
2. Disable the access point
3. Boot the machine and watch the boot wait while the dhcp request
times out. 
    

Actual Results:  Long wait, up to 30 seconds

Expected Results:  Wireless card should detect that there is no
accesspoint present and then skip the dhcp request

Additional info:

here is a patch to /sbin/ifup that does the expected result, but may
not be the best implementation

After line 197 ( is_wireless_device ${DEVICE} && . ./ifup-wireless)
add this:

is_wireless_device ${DEVICE} && {
    if [ "${MODE}" = "Managed" -o "${MODE}" = "Auto" ]; then
        ifconfig ${DEVICE} up
        if [ -n "`iwlist ${DEVICE} scan | grep -i 'no scan results'`"
]; then
            echo "No access points found"
            # no reason to finish setting up the network
            exit 1
        else
            echo "Access point located"
        fi
        ifconfig ${DEVICE} down
    fi
}

Comment 1 Barry K. Nathan 2004-10-05 13:15:43 UTC
I ran into this too, on FC-devel, at some point in the last week or two.

Comment 2 Kevin DeKorte 2005-03-31 15:11:01 UTC
Better version of the same code.

is_wireless_device ${DEVICE} && {
    if [ "${MODE}" = "Managed" -o "${MODE}" = "Auto" ]; then
        ifconfig ${DEVICE} up

        PREFERRED_AP=`grep ESSID /etc/sysconfig/network-scripts/ifcfg-${DEVICE}
| sed 's/ESSID=//g'`
        AP_LIST=`iwlist ${DEVICE} scan | grep ESSID | sed 's/ESSID:\"//g' | sed
's/\"//g'`
        AP_PRESENT=`echo $AP_LIST | grep $PREFERRED_AP`

        if [ -n "$AP_PRESENT" ]; then
            echo "Access point located"
        else
            echo "Preferred access points NOT found"
            # no reason to finish setting up the network
            exit 0
        fi
        ifconfig ${DEVICE} down
    fi
}


Comment 3 Bill Nottingham 2005-09-30 21:52:40 UTC
Realistically, the cards should not report a link if they're not associated.

If this were true, then this would just fall through to the normal 'no link'
case.

Because of this, I'm not adding this block at this time.


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