diff options
author | Tom Gundersen <teg@jklm.no> | 2015-09-28 13:38:43 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-21 02:35:31 +0200 |
commit | 8012cd391932d58b44332df106d426a360faf0a6 (patch) | |
tree | 68dc497a0bc69291e7794b1d70a82196e5b7c8d8 /src/network/networkd-link.c | |
parent | bf3ee9cdc9c7489e442e43cec09ad9275739875a (diff) |
networkd: link - only consider configured when all addresses are ready
We were considering a link configured whilst its IPv6 addresses were still
tentative.
Fixes issue #650.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 13 |
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"); |