From: Susant Sahani Date: Mon, 10 Dec 2018 17:05:40 +0000 (+0530) Subject: networkd: wait for kernel to reply ipv6 peer address X-Git-Tag: v241-rc1~68^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dfef713f3e390ced671ce0ee87782cc373c937d0;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index d1ef4510043..502b9e39dad 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -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");