summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 9d97089576..9661704f52 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -503,7 +503,10 @@ static int link_enter_configured(Link *link) {
return 0;
}
-void link_client_handler(Link *link) {
+void link_check_ready(Link *link) {
+ Address *a;
+ Iterator i;
+
assert(link);
assert(link->network);
@@ -523,6 +526,10 @@ void link_client_handler(Link *link) {
!link->dhcp4_configured && !link->dhcp6_configured))
return;
+ SET_FOREACH(a, link->addresses, i)
+ if (!address_is_ready(a))
+ return;
+
if (link->state != LINK_STATE_CONFIGURED)
link_enter_configured(link);
@@ -550,7 +557,7 @@ static int route_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata
if (link->link_messages == 0) {
log_link_debug(link, "Routes set");
link->static_configured = true;
- link_client_handler(link);
+ link_check_ready(link);
}
return 1;
@@ -579,7 +586,7 @@ static int link_enter_set_routes(Link *link) {
if (link->link_messages == 0) {
link->static_configured = true;
- link_client_handler(link);
+ link_check_ready(link);
} else
log_link_debug(link, "Setting routes");