summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-04-01 18:16:27 +0200
committerSteven Barth <steven@midlink.org>2014-04-01 18:16:27 +0200
commiteaff6fa14161d58af63bda2e5d56bed2593ad0d0 (patch)
tree427608adf5cf478474c6f87098780ec5d77bbdb6 /src
parent11bae21ad5f9b2cb6e94e8fda06bd99cf49d8ec6 (diff)
Wait at least 15 seconds for managed PD to be acknowledged
Diffstat (limited to 'src')
-rw-r--r--src/dhcpv6-ia.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index 159017f..c8473a7 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -460,6 +460,7 @@ static bool assign_pd(struct interface *iface, struct dhcpv6_assignment *assign)
iaidbuf, assign->iaid, assign->length);
ustream_write_pending(&assign->managed_sock.stream);
assign->managed_size = -1;
+ assign->valid_until = odhcpd_time() + 15;
list_add(&assign->head, &iface->ia_assignments);
}
@@ -1130,7 +1131,7 @@ ssize_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
// Was only a solicitation: mark binding for removal
if (assigned && hdr->msg_type == DHCPV6_MSG_SOLICIT) {
- a->valid_until = now + 15;
+ a->valid_until = 0;
} else if (assigned && hdr->msg_type == DHCPV6_MSG_REQUEST) {
if (hostname_len > 0) {
a->hostname = realloc(a->hostname, hostname_len + 1);