]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: always try to reconfigure when carrier gained
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 18 Nov 2021 20:12:35 +0000 (05:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 19 Nov 2021 03:04:42 +0000 (12:04 +0900)
When networkd detects a wlan interface, the interface may not be
connected to any access point, and may enter the unmanaged state.
After the interface connected to an access point, previously networkd
did not reconfigure the interface. This fixes the issue.

src/network/networkd-link.c

index e0e7cd8cd7e0f60b28c6f4d3c7285b6ab864c760..fd3485ef025189eb98ace8a4451705a20dcb6508 100644 (file)
@@ -1603,7 +1603,7 @@ static int link_carrier_gained(Link *link) {
         force_reconfigure = !streq_ptr(link->previous_ssid, link->ssid);
         link->previous_ssid = mfree(link->previous_ssid);
 
-        if (IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED)) {
+        if (!IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_FAILED, LINK_STATE_LINGER)) {
                 /* At this stage, both wlan and link information should be up-to-date. Hence,
                  * it is not necessary to call RTM_GETLINK, NL80211_CMD_GET_INTERFACE, or
                  * NL80211_CMD_GET_STATION commands, and simply call link_reconfigure_impl().