summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-07-19 08:18:37 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2021-07-19 18:38:16 +0200
commit2d302d88e4dfd48b18486c5ce2c7dfeb229a1b0a (patch)
tree4326b53b119adacaab1bcbc1cc240dd08e10a4f9 /src/network/networkd-address.c
parentci: add ppc64le Rawhide chroot to the Packit chroot set (diff)
downloadsystemd-2d302d88e4dfd48b18486c5ce2c7dfeb229a1b0a.tar.xz
systemd-2d302d88e4dfd48b18486c5ce2c7dfeb229a1b0a.zip
network: configure address with requested lifetime
When assigning the same address provided by a dynamic addressing protocol, the new lifetime is stored on Request::Address, but not Address object in Link object, which can be obtained by address_get(). So, we need to configure address with Address object in Request. Fixes #20245.
Diffstat (limited to '')
-rw-r--r--src/network/networkd-address.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 2d3f8ece2d..6718e442d3 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -1273,17 +1273,17 @@ int request_process_address(Request *req) {
if (r <= 0)
return r;
- r = address_get(link, req->address, &a);
- if (r < 0)
- return r;
-
- r = address_configure(a, link, req->netlink_handler);
+ r = address_configure(req->address, link, req->netlink_handler);
if (r < 0)
return r;
/* To prevent a double decrement on failure in after_configure(). */
req->message_counter = NULL;
+ r = address_get(link, req->address, &a);
+ if (r < 0)
+ return r;
+
if (req->after_configure) {
r = req->after_configure(req, a);
if (r < 0)