| From 7d680a0fdd0b6b8373096121014c7ca78e6c41ac Mon Sep 17 00:00:00 2001 |
| From: Vaibhav Rustagi <vaibhavrustagi@google.com> |
| Date: Wed, 30 Jun 2021 14:21:42 -0700 |
| Subject: [PATCH] network-wait-online should not stall when ipv4 is available. |
| |
| When IPV6 related configurations are available, systemd will try to find |
| the IPV6 address till timeout. This creates a problem when there is no |
| IPV6 address available. Due to this, network-wait-online will come up |
| after the timeout and it delays the system boot process. |
| |
| This CL is a mixture of |
| https://github.com/systemd/systemd/commit/552081a4992 and |
| https://github.com/systemd/systemd/commit/3cd5924c850929b03bc8d4ba5db614d662edb49a |
| --- |
| src/network/networkd-link.c | 15 ++++++--------- |
| 1 file changed, 6 insertions(+), 9 deletions(-) |
| |
| diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c |
| index 4afcf843bd..f33701a90d 100644 |
| --- a/src/network/networkd-link.c |
| +++ b/src/network/networkd-link.c |
| @@ -745,15 +745,12 @@ void link_check_ready(Link *link) { |
| if (in_addr_is_null(AF_INET6, (const union in_addr_union*) &link->ipv6ll_address) > 0) |
| return; |
| |
| - if ((link_dhcp4_enabled(link) && !link_dhcp6_enabled(link) && |
| - !link->dhcp4_configured) || |
| - (link_dhcp6_enabled(link) && !link_dhcp4_enabled(link) && |
| - !link->dhcp6_configured) || |
| - (link_dhcp4_enabled(link) && link_dhcp6_enabled(link) && |
| - !link->dhcp4_configured && !link->dhcp6_configured)) |
| - return; |
| - |
| - if (link_ipv6_accept_ra_enabled(link) && !link->ndisc_configured) |
| + if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link) || link_ipv6_accept_ra_enabled(link)) && |
| + !link->dhcp4_configured && |
| + !link->dhcp6_configured && |
| + !link->ndisc_configured) |
| + /* When DHCP or RA is enabled, at least one protocol must |
| + * provide an address. */ |
| return; |
| } |
| |
| -- |
| 2.32.0.93.g670b81a890-goog |
| |