summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-09-04 20:04:01 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-09-05 19:02:21 +0200
commit0ad8d953de2c9230a04aa334e9f02276f12ecf16 (patch)
tree04ceb5e72579354c96afee8f92c7908ef06dbf51 /src/network/networkd-dhcp4.c
parentdhcp: introduce sd_dhcp_lease_get_timestamp() (diff)
downloadsystemd-0ad8d953de2c9230a04aa334e9f02276f12ecf16.tar.xz
systemd-0ad8d953de2c9230a04aa334e9f02276f12ecf16.zip
sd-dhcp-client: introduce sd_dhcp_lease_has_6rd() helper function
No functional change, just refactoring.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 01fdba208d..a3f28035d7 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -839,7 +839,7 @@ int dhcp4_lease_lost(Link *link) {
link->dhcp4_configured = false;
if (link->network->dhcp_use_6rd &&
- dhcp4_lease_has_pd_prefix(link->dhcp_lease))
+ sd_dhcp_lease_has_6rd(link->dhcp_lease))
dhcp4_pd_prefix_lost(link);
k = dhcp4_remove_address_and_routes(link, /* only_marked = */ false);
@@ -1027,11 +1027,11 @@ static int dhcp_lease_renew(sd_dhcp_client *client, Link *link) {
link_dirty(link);
if (link->network->dhcp_use_6rd) {
- if (dhcp4_lease_has_pd_prefix(link->dhcp_lease)) {
+ if (sd_dhcp_lease_has_6rd(link->dhcp_lease)) {
r = dhcp4_pd_prefix_acquired(link);
if (r < 0)
return log_link_warning_errno(link, r, "Failed to process 6rd option: %m");
- } else if (dhcp4_lease_has_pd_prefix(old_lease))
+ } else if (sd_dhcp_lease_has_6rd(old_lease))
dhcp4_pd_prefix_lost(link);
}
@@ -1101,7 +1101,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
}
if (link->network->dhcp_use_6rd &&
- dhcp4_lease_has_pd_prefix(link->dhcp_lease)) {
+ sd_dhcp_lease_has_6rd(link->dhcp_lease)) {
r = dhcp4_pd_prefix_acquired(link);
if (r < 0)
return log_link_warning_errno(link, r, "Failed to process 6rd option: %m");