diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-04-23 13:32:19 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-04-23 14:15:46 +0200 |
commit | 413652910234f44e11d6550abf6871621474b8cb (patch) | |
tree | ab0bb9c06a40a61b1b4ea03b991ff014dfe42de3 /src | |
parent | 200cc8f556c1cdb8daa3b591116755e4a80ac655 (diff) |
dhcpv6-ia: keep tentative assignments alive for a short time
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/dhcpv6-ia.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index 737b328..e94dc38 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -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)) { |