]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: reset Information Refresh Time on stop
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Feb 2022 14:23:05 +0000 (23:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Feb 2022 06:02:30 +0000 (15:02 +0900)
src/libsystemd-network/sd-dhcp6-client.c

index ad6c2b550d4987cb47f15c0195021dd521cfa737..4f92fd6b1ce801d47a3416184458c4abbf75d70f 100644 (file)
@@ -631,6 +631,11 @@ static void client_stop(sd_dhcp6_client *client, int error) {
 
         client->lease = sd_dhcp6_lease_unref(client->lease);
 
+        /* Reset IRT here. Otherwise, we cannot restart the client in the information requesting mode,
+         * even though the lease is freed below. */
+        client->information_request_time_usec = 0;
+        client->information_refresh_time_usec = 0;
+
         (void) event_source_disable(client->receive_message);
         (void) event_source_disable(client->timeout_resend);
         (void) event_source_disable(client->timeout_expire);