]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
wait-online: by default not all interface need to be online
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 2 Feb 2024 17:44:08 +0000 (02:44 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 6 Feb 2024 12:45:37 +0000 (12:45 +0000)
Fixes an issue caused by ab3aed4a0349bbaa26f53340770c1b59b463e05d (v253).

By default, all managed interface need to be configured, and at least
one interface need to be online. Hence, offline interface should be ignored.

Fixes #29506.

src/network/wait-online/manager.c

index 0d1fdc372f684cb7ec72f55003ce6e98275281bf..ab1e753d50a2d9d826022a221782288b0c704fa9 100644 (file)
@@ -174,7 +174,9 @@ bool manager_configured(Manager *m) {
                 }
 
                 r = manager_link_is_online(m, l, /* state_range = */ NULL);
-                if (r < 0 && !m->any) /* Unlike the above loop, unmanaged interfaces are ignored here. */
+                /* Unlike the above loop, unmanaged interfaces are ignored here. Also, Configured but offline
+                 * interfaces are ignored. See issue #29506. */
+                if (r < 0 && r != -EADDRNOTAVAIL && !m->any)
                         return false;
                 if (r > 0) {
                         if (m->any)