mirror of
https://github.com/systemd/systemd.git
synced 2025-01-31 05:47:30 +03:00
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.
This commit is contained in:
parent
c6d0c6688e
commit
c91f8f90ba
@ -144,7 +144,7 @@ int network_adjust_dhcp_server(Network *network, Set **addresses) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int link_start_dhcp4_server(Link *link) {
|
||||
int link_start_dhcp4_server(Link *link) {
|
||||
int r;
|
||||
|
||||
assert(link);
|
||||
|
@ -12,6 +12,7 @@ int network_adjust_dhcp_server(Network *network, Set **addresses);
|
||||
|
||||
int link_request_dhcp_server(Link *link);
|
||||
|
||||
int link_start_dhcp4_server(Link *link);
|
||||
void manager_toggle_dhcp4_server_state(Manager *manager, bool start);
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_server_relay_agent_suboption);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user