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:
Susant Sahani 2018-12-10 22:35:40 +05:30 committed by Yu Watanabe
parent 1c8e48f506
commit dfef713f3e
1 changed files with 5 additions and 3 deletions

View File

@ -651,8 +651,7 @@ int address_configure(
if (r < 0)
return r;
r = netlink_call_async(link->manager->rtnl, NULL, req, callback,
link_netlink_destroy_callback, link);
r = netlink_call_async(link->manager->rtnl, NULL, req, callback, link_netlink_destroy_callback, link);
if (r < 0) {
address_release(address);
return log_error_errno(r, "Could not send rtnetlink message: %m");
@ -660,7 +659,10 @@ int address_configure(
link_ref(link);
r = address_add(link, address->family, &address->in_addr, address->prefixlen, NULL);
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);
if (r < 0) {
address_release(address);
return log_error_errno(r, "Could not add address: %m");