<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>143885</bug_id>
          
          <creation_ts>2006-08-14 07:02 0000</creation_ts>
          <short_desc>sys-apps/baselayout-1.12.4-r2 wireless regression: wpa_supplicant-0.5.4 fails to associate on madwifi</short_desc>
          <delta_ts>2006-08-15 06:15:30 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>baselayout</component>
          <version>2006.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>143988</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo@schirmeier.com</reporter>
          <assigned_to>uberlord@gentoo.org</assigned_to>
          <cc>mobile@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>gentoo@schirmeier.com</who>
            <bug_when>2006-08-14 07:02:55 0000</bug_when>
            <thetext>Since updating to baselayout-1.12.4-r2 (-r3 shows the same behaviour), the net.lo init script fails to bring up the WLAN connection with a WPA-encrypting AP:

~ # /etc/init.d/net.ath0 start
 * Starting ath0
 *   Loading networking modules for ath0
 *     modules: apipa arping ccwgroup macchanger macnet rename wpa_supplicant essidnet iptunnel iproute2 pppd system dhcpcd ip6to4
 *       wpa_supplicant provides wireless
 *       iproute2 provides interface
 *       pppd provides ppp
 *       dhcpcd provides dhcp
 *   Configuring ath0 for MAC address 00:30:4F:39:29:1D .  [ ok ]
 *   Starting wpa_supplicant on ath0 ...                   [ ok ]
 *   Starting wpa_cli on ath0 ...                          [ ok ]
 *     Waiting for association                             [ ok ]
 *     Failed to configure ath0 in the background          [ !! ]

Running &apos;dhcpcd ath0&apos; afterwards makes everything work.

I&apos;m using wpa_supplicant-0.5.4 (USE=&quot;madwifi qt3 qt4 readline ssl -dbus -gsm&quot;) and madwifi-ng{,-tools}-0.9.2 (USE=&quot;onoe -amrr&quot;).

/etc/conf.d/net:
modules=( &quot;wpa_supplicant&quot; )
wpa_supplicant_ath0=&quot;-Dmadwifi&quot;
wpa_timeout_ath0=60
config_eth0=( &quot;192.168.0.1&quot; )
config_ath0=( &quot;dhcp&quot; )
dhcp_eth0=&quot;release nontp&quot;
dhcp_ath0=&quot;release nontp&quot;

/etc/conf.d/wireless:
essid_ath0=&quot;xxx&quot;
channel_ath0=&quot;9&quot;
sleep_scan_ath0=&quot;1&quot;
associate_timeout_ath0=&quot;30&quot;

/etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
        ssid=&quot;xxx&quot;
        psk=&quot;yyy&quot;
        priority=1000
}

Side note: If anyone has similar symptoms WITHOUT wpa_supplicant, have a look at bug #143698.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>uberlord@gentoo.org</who>
            <bug_when>2006-08-14 08:09:37 0000</bug_when>
            <thetext>If you don&apos;t set wpa_timeout_ath0 and associate_timeout_ath0 then script startup will background making debugging easier. When it&apos;s in the background do

/etc/init.d/net/ath0 status

If it says &quot;inactive&quot; then an assocation has not been made. You can then examine youe logs for wpa_supplicant messages. You can also check wpa_supplicant status with the command &quot;wpa_cli status&quot;.

Please attach a wpa_supplicant log to this bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@schirmeier.com</who>
            <bug_when>2006-08-15 04:39:49 0000</bug_when>
            <thetext>nexus ~ # /etc/init.d/net.ath0 status
 * status:  inactive
nexus ~ # wpa_cli status
Selected interface &apos;ath0&apos;
bssid=00:04:0e:63:69:59
ssid=xxx
id=0
pairwise_cipher=TKIP
group_cipher=TKIP
key_mgmt=WPA-PSK
wpa_state=COMPLETED

syslog:
Aug 15 13:00:07 nexus wpa_cli: interface ath0 CONNECTED
Aug 15 13:00:15 nexus wpa_cli: executing &apos;/etc/init.d/net.ath0 --quiet start&apos; failed

When I try to run &apos;/etc/init.d/net.ath0 --quiet start&apos; manually, it complains with
nexus sbin # /etc/init.d/net.ath0 --quiet start
 WARNING:  net.ath0 has already been started.

Possibly /etc/wpa_supplicant/wpa_cli.action does not reflect the init script changes yet?

If you need more detailed wpa_supplicant logs, please give me a hint how to easily obtain them -- the -d switch only works properly if wpa_supplicant is not running as a daemon.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>uberlord@gentoo.org</who>
            <bug_when>2006-08-15 05:00:05 0000</bug_when>
            <thetext>No, wpa_action.sh is correct - I know, I wrote it.

Now, with net.ath0 in the active status do this

export IN_BACKGROUND=true
/etc/init.d/net.ath0 start

Post back with the results</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>uberlord@gentoo.org</who>
            <bug_when>2006-08-15 05:00:54 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; Now, with net.ath0 in the active status do this

Of course I meant in the inactive status ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@schirmeier.com</who>
            <bug_when>2006-08-15 06:06:30 0000</bug_when>
            <thetext>Ah, okay. The &quot;callback&quot; goes via environment vars.

nexus ~ # IN_BACKGROUND=true /etc/init.d/net.ath0 start
 * Starting ath0
[some lines omitted]
 *   Bringing up ath0
 *     dhcp
 *       Running dhcpcd ...
DHCP Client Daemon v.1.3.22-pl4
Copyright (C) 1996 - 1997 Yoichi Hariguchi &lt;yoichi@fore.com&gt;
Copyright (C) January, 1998 Sergei Viznyuk &lt;sv@phystech.com&gt;
Location: http://www.phystech.com/download/
Usage: dhcpcd [-dknorzBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]
       [-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]
       [-w windowsize] [-L ConfigDir] [-G [gateway]] [interface]                                                                [ !! ]

An strace shows that net.lo tries to run &apos;dhcpcd -h nexus -N -m 2000 ath0&apos;; the -m parameter does not exist in dhcpcd-1.3.22_p4-r5, which was still installed on my system for some unknown reason... &apos;emerge -uDav world&apos; never tried to update it to current stable 2.0.5-r1, although it&apos;s in the world file. If I can reproduce this behaviour, I&apos;ll file a Portage bug.

The dhcpcd update to 2.0.5-r1 resolved the problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@schirmeier.com</who>
            <bug_when>2006-08-15 06:11:09 0000</bug_when>
            <thetext>I forgot: Thanks, Roy. :-)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>uberlord@gentoo.org</who>
            <bug_when>2006-08-15 06:15:30 0000</bug_when>
            <thetext>(In reply to comment #6)
&gt; I forgot: Thanks, Roy. :-)

It&apos;s comments like that which keep me working on Gentoo :)</thetext>
          </long_desc>
      
    </bug>

</bugzilla>