Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909574 - net-wireless/wpa_supplicant - any reason why wpa_cli.sh never makes the network go inactive?
Summary: net-wireless/wpa_supplicant - any reason why wpa_cli.sh never makes the netwo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-03 23:46 UTC by Esteve Varela Colominas
Modified: 2024-05-08 04:39 UTC (History)
4 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 Esteve Varela Colominas 2023-07-03 23:46:10 UTC
Currently, in /etc/wpa_supplicant/wpa_cli.sh, the following is mentioned:

    # Deactivated, since stopping /etc/init.d/net.wlanX
    # stops the network completly.
    EXEC="false ${EXEC} stop"

This causes several problems when switching between wifi networks, in that the SSID values and corresponding configuration never get updated after the first connection.

I removed the "false" command, and everything seems to work as normal, the network doesn't seem to be stopped completely, as I'm still able to use wpa_cli to connect to a new network, and the status of the connection in "rc-service" seems to update appropriately.

So, I'm wondering, is the comment above still valid? Under what circumstances does this break things?
Comment 1 Maciej S. Szmigiero 2024-02-17 22:02:25 UTC
See also comments in Bug 591752.
Comment 2 Esteve Varela Colominas 2024-02-17 22:46:01 UTC
Comment 1 in that thread is essentially my use case
https://bugs.gentoo.org/591752#c1

I'm surprised that this has been noted a few times for over 8 years now. Thanks for letting me know.
Comment 3 Larry the Git Cow gentoo-dev 2024-05-08 01:26:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ace10427ce3ffe912d349cd8aea32673ecd719d9

commit ace10427ce3ffe912d349cd8aea32673ecd719d9
Author:     Matoro Mahri <matoro_gentoo@matoro.tk>
AuthorDate: 2024-02-29 19:42:14 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-05-08 01:22:38 +0000

    net-wireless/wpa_supplicant: call service stop on AP disconnect
    
    Lot of discussion in the primary ticket for this, but apparently
    multiple users report that previously connected wifi does not come up on
    resume from suspend.  This is due to the original implementation
    wpa_cli.sh not stopping the service, which was to avoid taking the
    interface down, which would interfere with wpa_supplicant which needs
    the interface to be up.  However, nowadays we set IN_BACKGROUND which
    takes care of preventing the interface from being taken down, so it's
    safe to stop the service.  If the service isn't stopped, then trying to
    start the service on reconnection is a no-op (because the service is
    already started).
    
    Closes: https://bugs.gentoo.org/591752
    Closes: https://bugs.gentoo.org/909574
    Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
    Closes: https://github.com/gentoo/gentoo/pull/35579
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 net-wireless/wpa_supplicant/files/wpa_cli-r1.sh    |  44 ++
 .../wpa_supplicant/wpa_supplicant-2.10-r5.ebuild   | 477 +++++++++++++++++++++
 .../wpa_supplicant/wpa_supplicant-9999.ebuild      |   2 +-
 3 files changed, 522 insertions(+), 1 deletion(-)
Comment 4 Esteve Varela Colominas 2024-05-08 04:39:57 UTC
Thanks!