From: Steven Barth Date: Tue, 1 Apr 2014 16:16:27 +0000 (+0200) Subject: Wait at least 15 seconds for managed PD to be acknowledged X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eaff6fa14161d58af63bda2e5d56bed2593ad0d0;p=oweals%2Fodhcpd.git Wait at least 15 seconds for managed PD to be acknowledged --- 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);