network/dhcp4: do not restart IPv4LL client when KeepConfiguration=dhcp
When KeepConfiguration=dhcp, we do not remove acquired address, hence not necessary to restart IPv4LL client.
This commit is contained in:
@@ -1168,6 +1168,11 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
|
||||
|
||||
switch (event) {
|
||||
case SD_DHCP_CLIENT_EVENT_STOP:
|
||||
if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) {
|
||||
log_link_notice(link, "DHCPv4 connection considered critical, ignoring request to reconfigure it.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (link->ipv4ll) {
|
||||
log_link_debug(link, "DHCP client is stopped. Acquiring IPv4 link-local address");
|
||||
|
||||
@@ -1182,11 +1187,6 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
|
||||
return log_link_warning_errno(link, r, "Could not acquire IPv4 link-local address: %m");
|
||||
}
|
||||
|
||||
if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) {
|
||||
log_link_notice(link, "DHCPv4 connection considered critical, ignoring request to reconfigure it.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (link->dhcp_lease) {
|
||||
if (link->network->dhcp_send_release) {
|
||||
r = sd_dhcp_client_send_release(client);
|
||||
|
||||
Reference in New Issue
Block a user