networkd-dhcp6: Fix PD prefix length for subnet assignment
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 24 Aug 2018 15:49:18 +0000 (09:49 -0600)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 24 Aug 2018 15:53:46 +0000 (09:53 -0600)
When computing the next network prefix to assign, compute the next
prefix to allocate based on the intended /64 assignment, not the
given prefix length for the whole prefix, e.g. /48, given to
systemd-networkd.

Fixes #9626.

src/network/networkd-dhcp6.c

index a64545b..5a23330 100644 (file)
@@ -174,7 +174,7 @@ static int dhcp6_pd_prefix_distribute(Link *dhcp6_link, Iterator *i,
 
                 n_used++;
 
-                r = in_addr_prefix_next(AF_INET6, &prefix, pd_prefix_len);
+                r = in_addr_prefix_next(AF_INET6, &prefix, 64);
                 if (r < 0 && n_used < n_prefixes)
                         return r;
         }