Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77823 - Preferred access points aren't found
Summary: Preferred access points aren't found
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-13 05:29 UTC by Jan Kunzmann
Modified: 2005-07-19 08:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kunzmann 2005-01-13 05:29:35 UTC
Line 618 if /lib/rcscripts/net.modules.d/iwconfig:
if ! ${found_AP}; then

I think it has to be
if ${found_AP}; then

because the following branch sets the association if an access point has been found, not if nothing has been found.

Reproducible: Always
Steps to Reproduce:





Using baselayout-1.11.7-r2
Comment 1 Roy Marples (RETIRED) gentoo-dev 2005-05-24 07:55:36 UTC
baselayout-1.11.12-r1 is the lastest in ~ARCH - does this issue still exist?
Comment 2 Jan Kunzmann 2005-06-02 22:32:04 UTC
Yes, it's still there. Look at the code:    
    
<snip>    
ewarn "Trying to force preferred in case they are hidden"    
for essid in "${preferred_aps[@]}"; do    
    local found_AP=false    
    for ((i = 0; i < ${#mac_APs[@]}; i++)); do    
        if [[ ${essid} == ${essid_APs[i]} ]]; then    
            found_AP=true    
            break    
        fi    
    done    
    if ! ${found_AP} ; then    
        ESSID=${essid}    
        iwconfig_associate ${iface} && return 0    
    fi    
done    
</snap>    
    
It crawls through array preferred_aps and compares it with every element in    
array essid_APs. If it finds an equality, it sets found_AP = true and breaks    
the inner loop. Then, if found_AP = false (!!!), it associates the last    
compared essid and returns.   
I can't test right now since I have no hidden wlan around anymore. But up to   
my understanding, "if found_AP = true" makes more sense here. You can even do   
without the found_AP variable if you do the association in the inner loop:   
 
for ((i = 0; i < ${#mac_APs[@]}; i++)); do    
    if [[ ${essid} == ${essid_APs[i]} ]]; then    
        ESSID=${essid}    
        iwconfig_associate ${iface} && return 0    
        break    
    fi    
done    
   
Comment 3 Roy Marples (RETIRED) gentoo-dev 2005-06-03 03:43:24 UTC
No, because by the time you've reached that bit of code it's already tried to
asscociate with AP's in it's preferred list that have been *found* in a scan.

So this loop is purely to associate with preferred AP's that were *not found* in
the scan.

Try setting RC_VERBOSE="yes" in /etc/conf.d/net and then re-running the script.
It should say what AP's it's found and the ones it tries to connect to.

Also, checkout the associate_order variable in /etc/conf.d/wireless.example
which may help you.

If this still fails, please post as attachments the full output of starting the
init script with the RC_VERBOSE="yes" setting and your /etc/conf.d/net and
wireless files.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2005-07-19 08:39:38 UTC
Closed - Need more information