[systemd-devel] [PATCH] networkd: fix systemd-networkd-wait-online with multiple NICs

Andrei Borzenkov arvidjaar at gmail.com
Wed Mar 25 22:53:40 PDT 2015


On Wed, Mar 25, 2015 at 11:49 PM,  <mischief at offblast.org> wrote:
> From: mischief <mischief at offblast.org>
>
> when checking interface status, systemd-networkd-wait-online
> will continue to wait if any interface is still configuring or
> being processed by udev. this patch allows it to return if any
> one interface is degraded/routable, as per the manual.

But current behavior is exactly what manual says: "By default, it will
wait for all links it is aware of and which are managed by
systemd-networkd.service(8) to be fully configured or failed". Or do I
miss something?

> ---
>  src/network/networkd-wait-online-manager.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/network/networkd-wait-online-manager.c b/src/network/networkd-wait-online-manager.c
> index 1c997a5..1ac162a 100644
> --- a/src/network/networkd-wait-online-manager.c
> +++ b/src/network/networkd-wait-online-manager.c
> @@ -74,13 +74,13 @@ bool manager_all_configured(Manager *m) {
>                  if (!l->state) {
>                          log_debug("link %s has not yet been processed by udev",
>                                    l->ifname);
> -                        return false;
> +                        continue;
>                  }
>
>                  if (streq(l->state, "configuring")) {
>                          log_debug("link %s is being processed by networkd",
>                                    l->ifname);
> -                        return false;
> +                        continue;
>                  }
>
>                  if (l->operational_state &&
> --
> 2.0.5
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list