Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373921 - net-wireless/wpa_supplicant-0.7.3-r2 kills itself indirectly
Summary: net-wireless/wpa_supplicant-0.7.3-r2 kills itself indirectly
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Bjarke Istrup Pedersen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-03 15:32 UTC by Christopher Head
Modified: 2011-09-27 19:20 UTC (History)
2 users (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 Christopher Head 2011-07-03 15:32:16 UTC
First, the init system starts the /etc/init.d/net.wlan0 initscript.
Next, this init script fires up wpa_supplicant and wpa_cli, telling the latter to send status reports to /etc/wpa_supplicant/wpa_cli.sh.
Next, a network is associated.
A while later, the association breaks for some reason (wireless is flaky, it happens).
Now, wpa_cli invokes /etc/wpa_supplicant/wpa_cli.sh with the action field ($2) set to DISCONNECT.
This switches on $ACTION and ends up deciding to run /etc/init.d/net.wlan0 stop in the background.
This kills wpa_supplicant, meaning the network association can never be re-established.

Changing the line:
EXEC="${EXEC} stop"

in wpa_cli.sh to:
EXEC="false ${EXEC} stop"

"fixes" the problem (it leaves wpa_supplicant running, allowing it to reconnect to the network—or, indeed, connect to another network), but this probably plays havoc with switching between networks and the fancy per-SSID configuration that's possible through /etc/conf.d/net (I haven't checked).

Reproducible: Always
Comment 1 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2011-07-03 17:34:02 UTC
Hmm, I'm can see the problem, but I must admit, that I cannot see all the implications that would result from changing that in wpa_cli.sh :)

I really cannot figure out why the file was installed in the first place (it was there when I took over wpa_supplicant).

I doesn't make much sense, since you are right about loosing network will stop the network all together.
Also, the part with CONNECTED/start doesn't make much sense, since it's only supposed to run AFTER net.wlanX has been started already.

Could you try and run with your fix for a few days, and see if anything breaks from it, and then report back?

If it doesn't break, I'm tempted to just change it and -r4 wpa_supplicant :)
Comment 2 Christopher Head 2011-07-04 17:31:41 UTC
I'll be happy to test, but I don't roam from SSID to SSID. I had assumed that wpa_cli.sh was somehow responsible for doing things like running dhcpcd or similar after the network associates, or doing the fancy stuff in /etc/conf.d/net where you can specify a static IP and route configuration per-SSID. I don't know how, exactly, though. I'm away from home right now, but when I return I can test a static IP/route.
Comment 3 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2011-07-07 07:55:53 UTC
I have commented it out in 0.7.3-r4, lets see if that works for people :)
At least we know, that how it does it now breaks it horrible.
Comment 4 eivn 2011-07-08 01:09:21 UTC
This change completely broke my wireless connection. Also I've never run into the issue Christopher describes. If the wireless connection ever drops then as soon as it is back wpa_supplicant reconnects fine and does not kill itself.

My /etc/conf.d/net contains:

config_wlan0="192.168.1.3/24"
routes_wlan0="default via 192.168.1.1"
wpa_supplicant_wlan0="-Dnl80211"

and /etc/wpa_supplicant/wpa_supplicant.conf contains:

network={
	ssid="ssid"
	proto=RSN
	key_mgmt=WPA-PSK
	group=CCMP
	pairwise=CCMP
	psk="psk"
}
Comment 5 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2011-07-08 07:07:11 UTC
Hmm, try -r5 and see if that works.
I have changed the script, so only the stop part is deactivated - lets see if that makes a difference.
Comment 6 Toralf Förster gentoo-dev 2011-07-08 09:31:38 UTC
(In reply to comment #5)
> Hmm, try -r5 and see if that works.
> I have changed the script, so only the stop part is deactivated - lets see if
> that makes a difference.

yes, issue solved (https://forums.gentoo.org/viewtopic-t-885752-highlight-.html and bug #374419)d
Comment 7 Christopher Head 2011-07-08 21:27:47 UTC
I wonder if this may also have some different effects depending on whether one is using wpa_supplicant alone (like me) or in combination with some other tool, if that's possible (iwconfig? NetworkManager?).
Comment 8 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2011-07-09 07:32:08 UTC
Thats quite possible - I must admit, I cannot keep up with every combination of things that can be used together with wpa_supplicant (people keeps coming up with combinations) :-)