summaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp/dhcp6_pd_client_cp.c
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-05-04 14:20:06 +0200
committerOle Trøan <otroan@employees.org>2018-06-21 10:03:03 +0000
commitdd3b8f7ab9f120b92c5fdf26016db47bbe18cb39 (patch)
tree6d43daf689e29638fdabb38c66c4357c1c5f491f /src/vnet/dhcp/dhcp6_pd_client_cp.c
parent65ce94a1dcafbba684085e1136b3f12c7bdface3 (diff)
Implement DHCPv6 IA NA client (VPP-1094)
Change-Id: I682a47d6cf9975aca6136188d28ee93eaadf4fe3 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/vnet/dhcp/dhcp6_pd_client_cp.c')
-rw-r--r--src/vnet/dhcp/dhcp6_pd_client_cp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/dhcp/dhcp6_pd_client_cp.c b/src/vnet/dhcp/dhcp6_pd_client_cp.c
index a2a0618106c..33813789e70 100644
--- a/src/vnet/dhcp/dhcp6_pd_client_cp.c
+++ b/src/vnet/dhcp/dhcp6_pd_client_cp.c
@@ -45,7 +45,6 @@ typedef struct
{
u32 prefix_group_index;
uword opaque_data; // used by prefix publisher
- u32 TODO;
ip6_address_t prefix;
u8 prefix_length;
u32 preferred_lt;
@@ -365,7 +364,7 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp)
if (!client_state->rebinding && client_state->server_index != server_index)
{
clib_warning ("Reply message arrived with Server ID different "
- "from that in Request of Renew message");
+ "from that in Request or Renew message");
return 0;
}
@@ -433,6 +432,8 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp)
prefix_info->preferred_lt = preferred_time;
prefix_info->valid_lt = valid_time;
prefix_info->due_time = current_time + valid_time;
+ if (prefix_info->due_time > rm->max_valid_due_time)
+ rm->max_valid_due_time = prefix_info->due_time;
continue;
}
@@ -448,6 +449,8 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp)
prefix_info->preferred_lt = preferred_time;
prefix_info->valid_lt = valid_time;
prefix_info->due_time = current_time + valid_time;
+ if (prefix_info->due_time > rm->max_valid_due_time)
+ rm->max_valid_due_time = prefix_info->due_time;
rm->client_state_by_sw_if_index[sw_if_index].prefix_count++;
u32 prefix_index = prefix_info - pm->prefix_pool;