X Tutup
Skip to content

Commit 9155da0

Browse files
committed
network: rename dhcp_lease_lost() -> dhcp4_lease_lost() and expose it
A preparation for later commits.
1 parent d5e3b3e commit 9155da0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/network/networkd-dhcp4.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ static int dhcp4_remove_all(Link *link) {
738738
return r;
739739
}
740740

741-
static int dhcp_lease_lost(Link *link) {
741+
int dhcp4_lease_lost(Link *link) {
742742
int k, r = 0;
743743

744744
assert(link);
@@ -748,7 +748,7 @@ static int dhcp_lease_lost(Link *link) {
748748

749749
link->dhcp4_configured = false;
750750

751-
/* dhcp_lease_lost() may be called during renewing IP address. */
751+
/* dhcp4_lease_lost() may be called during renewing IP address. */
752752
k = dhcp4_release_old_lease(link);
753753
if (k < 0)
754754
r = k;
@@ -813,7 +813,7 @@ static void dhcp_address_on_acd(sd_ipv4acd *acd, int event, void *userdata) {
813813
log_link_warning_errno(link, r, "Failed to send DHCP DECLINE, ignoring: %m");
814814

815815
if (link->dhcp_lease) {
816-
r = dhcp_lease_lost(link);
816+
r = dhcp4_lease_lost(link);
817817
if (r < 0)
818818
link_enter_failed(link);
819819
}
@@ -1180,7 +1180,7 @@ static int dhcp_lease_ip_change(sd_dhcp_client *client, Link *link) {
11801180

11811181
r = dhcp_lease_acquired(client, link);
11821182
if (r < 0)
1183-
(void) dhcp_lease_lost(link);
1183+
(void) dhcp4_lease_lost(link);
11841184

11851185
return r;
11861186
}
@@ -1276,7 +1276,7 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
12761276
r, "Failed to send DHCP RELEASE, ignoring: %m");
12771277
}
12781278

1279-
r = dhcp_lease_lost(link);
1279+
r = dhcp4_lease_lost(link);
12801280
if (r < 0) {
12811281
link_enter_failed(link);
12821282
return r;
@@ -1291,7 +1291,7 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
12911291
}
12921292

12931293
if (link->dhcp_lease) {
1294-
r = dhcp_lease_lost(link);
1294+
r = dhcp4_lease_lost(link);
12951295
if (r < 0) {
12961296
link_enter_failed(link);
12971297
return r;

src/network/networkd-dhcp4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ void network_adjust_dhcp4(Network *network);
2121
int dhcp4_configure(Link *link);
2222
int dhcp4_update_mac(Link *link);
2323
int dhcp4_start(Link *link);
24+
int dhcp4_lease_lost(Link *link);
2425

2526
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_client_identifier);
2627
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_acl_ip_address);

0 commit comments

Comments
 (0)
X Tutup