]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: ndisc - always configure dhcp6 client
authorTom Gundersen <teg@jklm.no>
Mon, 16 Nov 2015 15:47:18 +0000 (16:47 +0100)
committerTom Gundersen <teg@jklm.no>
Tue, 17 Nov 2015 12:26:46 +0000 (13:26 +0100)
The ndisc client may trigger the dhcpv6 client to be started (this is the common case),
so we should allocate the dhcpv6 client whenever we allocate the ndisc one.

src/network/networkd-dhcp6.c
src/network/networkd-link.c

index f83ff54369ec72c1f8740637309e1076d4578272..e67e51f7ef0c88086608295ee1bbd8350dc084e2 100644 (file)
@@ -211,6 +211,9 @@ int dhcp6_configure(Link *link) {
 
         assert(link);
 
+        if (link->dhcp6_client)
+                return 0;
+
         r = sd_dhcp6_client_new(&client);
         if (r < 0)
                 return r;
index f97600e2b509e90bb156cdd419223a1c86bd3340..ba64473cd35110a097545e949aa292bfb09aa1b6 100644 (file)
@@ -2089,7 +2089,8 @@ static int link_configure(Link *link) {
                         return r;
         }
 
-        if (link_dhcp6_enabled(link)) {
+        if (link_dhcp6_enabled(link) ||
+            link_ipv6_accept_ra_enabled(link)) {
                 r = dhcp6_configure(link);
                 if (r < 0)
                         return r;