networkd: wait for kernel to reply ipv6 peer address
When we configure address with peer, peer address is repliedby kernel. Hence add the peer when it is available. Closes #9130.
This commit is contained in:
parent
1c8e48f506
commit
dfef713f3e
|
@ -651,8 +651,7 @@ int address_configure(
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
r = netlink_call_async(link->manager->rtnl, NULL, req, callback,
|
r = netlink_call_async(link->manager->rtnl, NULL, req, callback, link_netlink_destroy_callback, link);
|
||||||
link_netlink_destroy_callback, link);
|
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
address_release(address);
|
address_release(address);
|
||||||
return log_error_errno(r, "Could not send rtnetlink message: %m");
|
return log_error_errno(r, "Could not send rtnetlink message: %m");
|
||||||
|
@ -660,6 +659,9 @@ int address_configure(
|
||||||
|
|
||||||
link_ref(link);
|
link_ref(link);
|
||||||
|
|
||||||
|
if (address->family == AF_INET6 && !in_addr_is_null(address->family, &address->in_addr_peer))
|
||||||
|
r = address_add(link, address->family, &address->in_addr_peer, address->prefixlen, NULL);
|
||||||
|
else
|
||||||
r = address_add(link, address->family, &address->in_addr, address->prefixlen, NULL);
|
r = address_add(link, address->family, &address->in_addr, address->prefixlen, NULL);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
address_release(address);
|
address_release(address);
|
||||||
|
|
Loading…
Reference in a new issue