network: use link_start_dhcp4_server() at one more place

Otherwise, even if the persistent storage is not ready, the DHCP server
may be started e.g. by unplugging and plugging cable.

Follow-up for 5582b36c38.
This commit is contained in:
Yu Watanabe
2024-03-15 02:28:38 +09:00
parent c6d0c6688e
commit c91f8f90ba
3 changed files with 5 additions and 6 deletions
+3 -5
View File
@@ -713,11 +713,9 @@ static int link_acquire_dynamic_ipv4_conf(Link *link) {
log_link_debug(link, "Acquiring IPv4 link-local address.");
}
if (link->dhcp_server) {
r = sd_dhcp_server_start(link->dhcp_server);
if (r < 0)
return log_link_warning_errno(link, r, "Could not start DHCP server: %m");
}
r = link_start_dhcp4_server(link);
if (r < 0)
return log_link_warning_errno(link, r, "Could not start DHCP server: %m");
r = ipv4acd_start(link);
if (r < 0)