diff options
author | Tom Gundersen <teg@jklm.no> | 2014-08-06 13:48:11 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-08-12 20:42:59 +0200 |
commit | 431ca2cebbfbf046699b5cb9308e9271b464ed36 (patch) | |
tree | 333cd93c4f33f52d550b9ff349d0c9ee63ba6ca3 /src | |
parent | 0b1831c20c4d30077b6560b2b7d88bdb220d5cef (diff) |
networkd: link - make check for whether addresses/routes are being configured implicit
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-link.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 49bfdf029a..f73b06916a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -452,13 +452,6 @@ static int link_enter_set_routes(Link *link) { link->state = LINK_STATE_SETTING_ROUTES; - if (!link->network->static_routes && - !link->dhcp_lease && - !ipv4ll_is_bound(link->ipv4ll)) - return link_enter_configured(link); - - log_debug_link(link, "setting routes"); - LIST_FOREACH(routes, rt, link->network->static_routes) { r = route_configure(rt, link, &route_handler); if (r < 0) { @@ -562,7 +555,8 @@ static int link_enter_set_routes(Link *link) { if (link->route_messages == 0) { link_enter_configured(link); - } + } else + log_debug_link(link, "setting routes"); return 0; } @@ -664,13 +658,6 @@ static int link_enter_set_addresses(Link *link) { link->state = LINK_STATE_SETTING_ADDRESSES; - if (!link->network->static_addresses && - !link->dhcp_lease && - !ipv4ll_is_bound(link->ipv4ll)) - return link_enter_set_routes(link); - - log_debug_link(link, "setting addresses"); - LIST_FOREACH(addresses, ad, link->network->static_addresses) { r = address_configure(ad, link, &address_handler); if (r < 0) { @@ -778,6 +765,11 @@ static int link_enter_set_addresses(Link *link) { link->addr_messages ++; } + if (link->addr_messages == 0) { + link_enter_set_routes(link); + } else + log_debug_link(link, "setting addresses"); + return 0; } |