diff options
-rw-r--r-- | src/network/networkd-dhcp-prefix-delegation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c index d2d676c6f5..180a758c43 100644 --- a/src/network/networkd-dhcp-prefix-delegation.c +++ b/src/network/networkd-dhcp-prefix-delegation.c @@ -800,9 +800,6 @@ static int dhcp6_pd_assign_prefixes(Link *link, Link *uplink) { if (r < 0) break; - lifetime_preferred_usec = usec_add(lifetime_preferred_sec * USEC_PER_SEC, timestamp_usec); - lifetime_valid_usec = usec_add(lifetime_valid_sec * USEC_PER_SEC, timestamp_usec); - if (pd_prefix_len > 64) continue; @@ -811,6 +808,9 @@ static int dhcp6_pd_assign_prefixes(Link *link, Link *uplink) { if (r < 0) return r; + lifetime_preferred_usec = usec_add(lifetime_preferred_sec * USEC_PER_SEC, timestamp_usec); + lifetime_valid_usec = usec_add(lifetime_valid_sec * USEC_PER_SEC, timestamp_usec); + r = dhcp6_pd_assign_prefix(link, &pd_prefix, pd_prefix_len, lifetime_preferred_usec, lifetime_valid_usec); if (r < 0) return r; |