diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-05 04:14:01 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-14 02:23:09 +0100 |
commit | 80a89d1ad59bce6facd98f2d47d0e760f56f9aac (patch) | |
tree | 6ee54955abec78e3ff6c8e9c1e7fdaed69ebf29b /src/network/networkd-dhcp4.c | |
parent | network/ipv4ll: use a foreign IPv4LL address when KeepConfiguration=dhcp (diff) | |
download | systemd-80a89d1ad59bce6facd98f2d47d0e760f56f9aac.tar.xz systemd-80a89d1ad59bce6facd98f2d47d0e760f56f9aac.zip |
network: rename KeepConfiguration=dhcp -> dynamic
KeepConfiguration=dhcp keeps not only DHCP configurations but
also SLAAC or IPV4LL. Let's rename the value to 'dynamic'.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r-- | src/network/networkd-dhcp4.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 684580f5b6..d94ac1a213 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -915,7 +915,7 @@ static int dhcp4_request_address(Link *link, bool announce) { if (r < 0) return log_link_debug_errno(link, r, "DHCP error: failed to get DHCP server IP address: %m"); - if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { + if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DYNAMIC)) { r = sd_dhcp_lease_get_lifetime_timestamp(link->dhcp_lease, CLOCK_BOOTTIME, &lifetime_usec); if (r < 0) return log_link_warning_errno(link, r, "DHCP error: failed to get lifetime: %m"); @@ -1168,7 +1168,7 @@ 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)) { + if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DYNAMIC)) { log_link_notice(link, "DHCPv4 connection considered critical, ignoring request to reconfigure it."); return 0; } @@ -1199,7 +1199,7 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) { break; case SD_DHCP_CLIENT_EVENT_EXPIRED: - if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { + if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DYNAMIC)) { log_link_notice(link, "DHCPv4 connection considered critical, ignoring request to reconfigure it."); return 0; } @@ -1214,7 +1214,7 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) { break; case SD_DHCP_CLIENT_EVENT_IP_CHANGE: - if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { + if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DYNAMIC)) { log_link_notice(link, "DHCPv4 connection considered critical, ignoring request to reconfigure it."); return 0; } @@ -1400,8 +1400,8 @@ static int dhcp4_set_request_address(Link *link) { return sd_dhcp_client_set_request_address(link->dhcp_client, &link->network->dhcp_request_address); } - /* 3. If KeepConfiguration=dhcp, use a foreign dynamic address. */ - if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) + /* 3. If KeepConfiguration=dynamic, use a foreign dynamic address. */ + if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DYNAMIC)) return 0; SET_FOREACH(a, link->addresses) { |