summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-11-01 15:47:59 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-11-04 18:56:48 +0100
commit8c3d6d7150b9f0aed156f96ba367e56a83574677 (patch)
treec1f8bf07e1106d093b768fb48f10770100d2877d /src
parentnetwork: expose log_route_debug() and log_address_debug() (diff)
downloadsystemd-8c3d6d7150b9f0aed156f96ba367e56a83574677.tar.xz
systemd-8c3d6d7150b9f0aed156f96ba367e56a83574677.zip
network/dhcp4: keep DHCP address and routes on stop even when SendDecline=yes
KeepConfiguration=dhcp or dhcp-on-stop already violate RFC. It is not necessary to honor the RFC about sending decline message on stop.
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-link.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index ea68b14a8c..0e37618a88 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -376,11 +376,11 @@ int link_stop_engines(Link *link, bool may_keep_dhcp) {
assert(link->manager);
assert(link->manager->event);
- bool keep_dhcp = may_keep_dhcp &&
- link->network &&
- !link->network->dhcp_send_decline && /* IPv4 ACD for the DHCPv4 address is running. */
- (link->manager->state == MANAGER_RESTARTING ||
- FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP_ON_STOP));
+ bool keep_dhcp =
+ may_keep_dhcp &&
+ link->network &&
+ (link->manager->state == MANAGER_RESTARTING ||
+ FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP_ON_STOP));
if (!keep_dhcp) {
r = sd_dhcp_client_stop(link->dhcp_client);