diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-03-13 18:01:15 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-03-14 18:28:38 +0100 |
commit | c91f8f90baefe7045fc46bd4e8aff01607cd5d37 (patch) | |
tree | 8817e9eea488c699847d0b96478ab6a079ec6bad /src/network/networkd-link.c | |
parent | man: fix efi var vendor uuid for systemd-bless-boot.service (diff) | |
download | systemd-c91f8f90baefe7045fc46bd4e8aff01607cd5d37.tar.xz systemd-c91f8f90baefe7045fc46bd4e8aff01607cd5d37.zip |
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 5582b36c384fc522c23ef1ac032001882d033aff.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 650e94c313..3e8aa9e37a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -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) |