dhcpv6-ia: keep tentative assignments alive for a short time
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 23 Apr 2018 11:32:19 +0000 (13:32 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 23 Apr 2018 12:15:46 +0000 (14:15 +0200)
Assign tentative assignments a lifetime of 60 seconds; this will assure
the assignment is seen as valid during lookup when receiving a later
REQUEST from the DHCPv6 client.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/dhcpv6-ia.c

index 737b328b0bcbc095ef2cdaf91d2bf622f3e1ec51..e94dc381d93634812e848b8d0e3465bc204d02b8 100644 (file)
@@ -1261,7 +1261,8 @@ ssize_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
                                a->flags |= OAF_TENTATIVE;
 
                                if (!(a->flags & OAF_STATIC))
-                                       a->valid_until = now;
+                                       /* Keep tentative assignment around for 60 seconds */
+                                       a->valid_until = now + 60;
                        } else if (assigned &&
                                        (hdr->msg_type == DHCPV6_MSG_REQUEST ||
                                         hdr->msg_type == DHCPV6_MSG_REBIND)) {