Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143885 - sys-apps/baselayout-1.12.4-r2 wireless regression: wpa_supplicant-0.5.4 fails to associate on madwifi
Summary: sys-apps/baselayout-1.12.4-r2 wireless regression: wpa_supplicant-0.5.4 fails...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 143988
  Show dependency tree
 
Reported: 2006-08-14 07:02 UTC by Horst Schirmeier
Modified: 2006-08-15 06:15 UTC (History)
1 user (show)

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 Horst Schirmeier 2006-08-14 07:02:55 UTC
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 'dhcpcd ath0' afterwards makes everything work.

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

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

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

/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="xxx"
        psk="yyy"
        priority=1000
}

Side note: If anyone has similar symptoms WITHOUT wpa_supplicant, have a look at bug #143698.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-08-14 08:09:37 UTC
If you don't set wpa_timeout_ath0 and associate_timeout_ath0 then script startup will background making debugging easier. When it's in the background do

/etc/init.d/net/ath0 status

If it says "inactive" 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 "wpa_cli status".

Please attach a wpa_supplicant log to this bug.
Comment 2 Horst Schirmeier 2006-08-15 04:39:49 UTC
nexus ~ # /etc/init.d/net.ath0 status
 * status:  inactive
nexus ~ # wpa_cli status
Selected interface 'ath0'
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 '/etc/init.d/net.ath0 --quiet start' failed

When I try to run '/etc/init.d/net.ath0 --quiet start' 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.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2006-08-15 05:00:05 UTC
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
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-08-15 05:00:54 UTC
(In reply to comment #3)
> Now, with net.ath0 in the active status do this

Of course I meant in the inactive status ;)
Comment 5 Horst Schirmeier 2006-08-15 06:06:30 UTC
Ah, okay. The "callback" 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 <yoichi@fore.com>
Copyright (C) January, 1998 Sergei Viznyuk <sv@phystech.com>
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 'dhcpcd -h nexus -N -m 2000 ath0'; the -m parameter does not exist in dhcpcd-1.3.22_p4-r5, which was still installed on my system for some unknown reason... 'emerge -uDav world' never tried to update it to current stable 2.0.5-r1, although it's in the world file. If I can reproduce this behaviour, I'll file a Portage bug.

The dhcpcd update to 2.0.5-r1 resolved the problem.
Comment 6 Horst Schirmeier 2006-08-15 06:11:09 UTC
I forgot: Thanks, Roy. :-)
Comment 7 Roy Marples (RETIRED) gentoo-dev 2006-08-15 06:15:30 UTC
(In reply to comment #6)
> I forgot: Thanks, Roy. :-)

It's comments like that which keep me working on Gentoo :)