Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171273 - net-wireless/wpa_supplicant - race condition in wpa_supplicant.sh
Summary: net-wireless/wpa_supplicant - race condition in wpa_supplicant.sh
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-17 19:11 UTC by Nick Kralevich
Modified: 2007-03-22 10:16 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 Nick Kralevich 2007-03-17 19:11:42 UTC
/lib/rcscripts/net/wpa_supplicant.sh is the script which controls network configuration when using wpa_supplicant.

When a network interface is initialized, this script performs the following actions:

1) start /sbin/wpa_supplicant 
2) Start /bin/wpa_cli -a/etc/wpa_supplicant/wpa_cli.sh

/sbin/wpa_supplicant notifies /bin/wpa_cli whenever a change in wireless status is observed.  /bin/wpa_cli then notifies /etc/wpa_supplicant/wpa_cli.sh to bring up/down the network interface (using dhcp)

It's possible for /sbin/wpa_supplicant to associate with a wireless access point before /bin/wpa_cli is started.  Once /bin/wpa_cli is started, it never receives a notification that the interface is associated.  As a result, it never calls /etc/wpa_supplicant/wpa_cli.sh and the network interface is never configured.


Reproducible: Always

Steps to Reproduce:
Steps to *help* reproduce this problem:

1) Modify /lib/rcscripts/net/wpa_supplicant.sh , adding a "sleep 30" between the time that /sbin/wpa_supplicant is started and /bin/wpa_cli is started.

Actual Results:  
"/sbin/iwconfig eth1" reports that the interface is connected to a wireless access point, but "/sbin/ifconfig eth1" reports that the interface does not have an IP address.

Expected Results:  
eth1 should be both connected and have an IP address.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-03-22 10:16:41 UTC
This is already fixed in baselayout-1.13 and will be fixed in the next 1.12

In the meantime, you can add -W to the start-stop-daemon options for wpa_suppliant  in /lib/rcscripts/net/wpa_supplicant.sh

or to /etc/conf.d/net

wpa_supplicant_eth1="-W"