diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-16 18:36:42 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-16 18:36:42 -0500 |
commit | 2c45295e47642812ea417efba7f2f3339c6e2912 (patch) | |
tree | 3f6bd3f23481f8878f83d43061d083e4dae06d2b /src/network/networkd-manager.c | |
parent | 12343facf32d5d4c7945f9768db09fd2a8526cd2 (diff) | |
parent | c77d26122a35a8555953bbe71e4a4ff664f3462c (diff) |
Merge pull request #2623 from poettering/networkd-fixes
Networkd, resolved, build-sys fixes
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r-- | src/network/networkd-manager.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index b527191a5a..b8cb7f875d 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -1091,22 +1091,19 @@ static bool manager_check_idle(void *userdata) { assert(m); + /* Check whether we are idle now. The only case when we decide to be idle is when there's only a loopback + * device around, for which we have no configuration, and which already left the PENDING state. In all other + * cases we are not idle. */ + HASHMAP_FOREACH(link, m->links, i) { - /* we are not woken on udev activity, so let's just wait for the - * pending udev event */ + /* We are not woken on udev activity, so let's just wait for the pending udev event */ if (link->state == LINK_STATE_PENDING) return false; - if (!link->network) - continue; + if ((link->flags & IFF_LOOPBACK) == 0) + return false; - /* we are not woken on netork activity, so let's stay around */ - if (link_lldp_enabled(link) || - link_ipv4ll_enabled(link) || - link_dhcp4_server_enabled(link) || - link_dhcp4_enabled(link) || - link_dhcp6_enabled(link) || - link_ipv6_accept_ra_enabled(link)) + if (link->network) return false; } |