summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-06-12 05:01:42 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-08-10 07:43:34 +0200
commitd09a179e6973fb1da4a0366c25d9d16679655f2d (patch)
treef5e1302f90002b2cf25c1f479e9f3b9f1682895c /src/network/networkd-manager.c
parentUpdate traditional Chinese Translation (diff)
downloadsystemd-d09a179e6973fb1da4a0366c25d9d16679655f2d.tar.xz
systemd-d09a179e6973fb1da4a0366c25d9d16679655f2d.zip
network: reconfigure link after coming back from sleep
Previously, link was reconfigured with `link_carrier_reset()`, but it just re-request to configure static addresses, routes, etc, and restart engines (e.g. DHCP client). However, after coming back from sleep, several link information may be changed, especially the wifi access point may be different. So, we may need to reconfigure the interface.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 374d27bef3..82aecf1c76 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -59,9 +59,9 @@ static int manager_reset_all(Manager *m) {
assert(m);
HASHMAP_FOREACH(link, m->links_by_index) {
- r = link_carrier_reset(link);
+ r = link_reconfigure_after_sleep(link);
if (r < 0) {
- log_link_warning_errno(link, r, "Could not reset carrier: %m");
+ log_link_warning_errno(link, r, "Failed to reconfigure interface: %m");
link_enter_failed(link);
}
}