]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: make link become configured state when at least one dynamic protocol provide...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 3 Jun 2020 08:07:16 +0000 (17:07 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 4 Jun 2020 08:49:26 +0000 (10:49 +0200)
Before this, to speed up the system boot with IPv4 only network,
we need to specify `IPv6AcceptRA=no`, as it is enabled by default.

Closes #15469.

src/network/networkd-link.c

index 6ca6bfa8e40454b82fab59ffc998391ee2ccb217..805aff3ab1d5dd3181db9b27c8daa43c53eb7869 100644 (file)
@@ -1133,16 +1133,14 @@ void link_check_ready(Link *link) {
                     in_addr_is_null(AF_INET6, (const union in_addr_union*) &link->ipv6ll_address))
                         return;
 
-                if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link)) &&
+                if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link) || link_ipv6_accept_ra_enabled(link)) &&
                     !link->dhcp4_configured &&
                     !link->dhcp6_configured &&
+                    !link->ndisc_configured &&
                     !(link_ipv4ll_enabled(link, ADDRESS_FAMILY_FALLBACK_IPV4) && link->ipv4ll_address))
-                        /* When DHCP is enabled, at least one protocol must provide an address, or
+                        /* When DHCP or RA is enabled, at least one protocol must provide an address, or
                          * an IPv4ll fallback address must be configured. */
                         return;
-
-                if (link_ipv6_accept_ra_enabled(link) && !link->ndisc_configured)
-                        return;
         }
 
         if (link->state != LINK_STATE_CONFIGURED)