mirror of
https://github.com/systemd/systemd
synced 2024-09-16 06:43:18 +00:00
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.
This commit is contained in:
parent
a2efdaac07
commit
2d302d88e4
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue