summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-01-02 20:40:29 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-01-02 20:43:34 +0100
commitf22b586a215962416bdbd692aabb89b1ac2999d0 (patch)
treefef2a97c0b9ca7c5e1460fb55081556dc0255318 /src/network/networkd-dhcp4.c
parentnetwork/address: not necessary to remmber address before remove (diff)
downloadsystemd-f22b586a215962416bdbd692aabb89b1ac2999d0.tar.xz
systemd-f22b586a215962416bdbd692aabb89b1ac2999d0.zip
network/address: introduce address_remove_and_cancel()
Then, replace address_remove_and_drop() with it. If an address is requested, and the request is already called, we may not received its reply and notification from the kernel, and the corresponding address object may not be remmbered. Even in such case, we need to remove the address, otherwise the address will come later after the function called.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index bca426f623..8aee30e726 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -263,7 +263,7 @@ static int dhcp4_remove_address_and_routes(Link *link, bool only_marked) {
if (only_marked && !address_is_marked(address))
continue;
- RET_GATHER(ret, address_remove_and_drop(address));
+ RET_GATHER(ret, address_remove_and_cancel(address, link));
}
return ret;