networkd-dhcp6: Fix PD prefix length for subnet assignment

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.
This commit is contained in:
Patrik Flykt 2018-08-24 09:49:18 -06:00
parent 3ec8303fdc
commit 37f52406d9
1 changed files with 1 additions and 1 deletions

View 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;
}