Ticket #107 (closed defect: fixed)
Opened 2 years ago
Last modified 2 years ago
wpa_supplicant fails to survive connection lost
Reported by: | Stefan Hellermann <stefan@the2masters.de> | Owned by: | roy |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | init.d scripts | Version: | |
Keywords: | Cc: |
Description
Hi Roy,
I noticed a misbehavior when loosing a wpa connection. dhcpcd is killed (okay) and then wpa_supplicant is killed, too, by /lib/rc/net/wpa_supplicant.sh.
/etc/wpa_supplicant/wpa_cli.sh is called when loosing the connection, it executes /etc/init.d/net.wlan0 stop with IN_BACKGROUND=true and this should stop dhcpcd, but not wpa_supplicant, I think.
I attached a small patch which works for me. It's obvious not correct, now wpa_supplicant isn't stopped on normal shutdown.
But: If I loose the connection now, dhcpcd is stopped. When the connection arrives again wpa_supplicant is still running and catches it. Then dhcpcd is started again. Wonderful :)
Cheers
Stefan
Attachments
Change History
Changed 2 years ago by Stefan Hellermann <stefan@the2masters.de>
- attachment openrc-wpa_supplicant.patch added
comment:483 Changed 2 years ago by Stefan Hellermann <stefan@the2masters.de>
Created an attachment (id=50)
wrong patch
Changed 2 years ago by Stefan Hellermann <stefan@the2masters.de>
- attachment openrc-wpa_supplicant-v2.patch added
better patch :-)
comment:484 Changed 2 years ago by Stefan Hellermann <stefan@the2masters.de>
Created an attachment (id=51)
better patch :-)
After looking at the logic I have corrected the patch
Tests done:
- stopping net.wlan0 normal: dhcpcd + wpa_supplicant is stopped [OK]
- stopping net.wlan0 with IN_BACKGROUND=true: only dhcpcd is stopped [OK]
- after stopping it with IN_BACKGROUND stop it again normal: only wpa_supplicant is stopped, no error [OK]
- killall wpa_supplicant, then stop net.wlan0: only dhcpcd is stopped [OK]
But this doesn't mean the patch is correct :-)
Cheers
Stefan
comment:488 Changed 2 years ago by roy
I'll have to look at this when I have the time.
The issue is that if wpa_supplicant is used for auth on a wired interface controlled by netplug/ifplugd.
comment:514 Changed 2 years ago by roy
- Status changed from new to resolved
- Resolution set to fixed
I've now found the time - and the fix! Sorry about the delay.
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commitdiff;h=a0a22034be1e61913396a1bd349f28e2d306ae61
wrong patch