summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp6-lease.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-network/sd-dhcp6-lease.c')
-rw-r--r--src/libsystemd-network/sd-dhcp6-lease.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-lease.c b/src/libsystemd-network/sd-dhcp6-lease.c
index b9d0503642..e2715ea659 100644
--- a/src/libsystemd-network/sd-dhcp6-lease.c
+++ b/src/libsystemd-network/sd-dhcp6-lease.c
@@ -41,7 +41,7 @@ int dhcp6_lease_ia_rebind_expire(const DHCP6IA *ia, uint32_t *expire) {
assert_return(expire, -EINVAL);
LIST_FOREACH(addresses, addr, ia->addresses) {
- t = be32toh(addr->lifetime_valid);
+ t = be32toh(addr->iaaddr.lifetime_valid);
if (valid < t)
valid = t;
}
@@ -156,9 +156,11 @@ int sd_dhcp6_lease_get_next_address(sd_dhcp6_lease *lease,
if (!lease->addr_iter)
return -ENOMSG;
- memcpy(addr, &lease->addr_iter->address, sizeof(struct in6_addr));
- *lifetime_preferred = be32toh(lease->addr_iter->lifetime_preferred);
- *lifetime_valid = be32toh(lease->addr_iter->lifetime_valid);
+ memcpy(addr, &lease->addr_iter->iaaddr.address,
+ sizeof(struct in6_addr));
+ *lifetime_preferred =
+ be32toh(lease->addr_iter->iaaddr.lifetime_preferred);
+ *lifetime_valid = be32toh(lease->addr_iter->iaaddr.lifetime_valid);
lease->addr_iter = lease->addr_iter->addresses_next;