1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

network: update state file when DHCPv6 reply for INFORMATION-REQUEST is received

Otherwise, received information, e.g. DNS servers, may not be saved in
the state file, and will not be propagated to clients like resolved.

Fixes the first issue of #29678.
This commit is contained in:
Yu Watanabe 2023-10-26 12:19:40 +09:00
parent c173be0d4c
commit ef0a234a75

View File

@ -16,6 +16,7 @@
#include "networkd-manager.h"
#include "networkd-queue.h"
#include "networkd-route.h"
#include "networkd-state-file.h"
#include "string-table.h"
#include "string-util.h"
@ -351,7 +352,10 @@ static int dhcp6_lease_information_acquired(sd_dhcp6_client *client, Link *link)
if (r < 0)
return log_link_error_errno(link, r, "Failed to get DHCPv6 lease: %m");
return unref_and_replace_full(link->dhcp6_lease, lease, sd_dhcp6_lease_ref, sd_dhcp6_lease_unref);
unref_and_replace_full(link->dhcp6_lease, lease, sd_dhcp6_lease_ref, sd_dhcp6_lease_unref);
link_dirty(link);
return 0;
}
static int dhcp6_lease_lost(Link *link) {