diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2019-10-01 11:30:56 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-10-03 10:07:21 +0000 |
commit | 103ba6ba9ecd1d65bcbd3bb4edc115beb9ee7671 (patch) | |
tree | eca605b6a3860425958b501b9eb215f8ac84326c /src/vnet/dhcp/dhcp6_pd_client_cp.c | |
parent | d6d50cebde647f9a5ee7251a7fef977506f315d7 (diff) |
dhcp: API cleanup
Use consistent API types.
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia63d920788add2584060a240321acced7a471640
Diffstat (limited to 'src/vnet/dhcp/dhcp6_pd_client_cp.c')
-rw-r--r-- | src/vnet/dhcp/dhcp6_pd_client_cp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/dhcp/dhcp6_pd_client_cp.c b/src/vnet/dhcp/dhcp6_pd_client_cp.c index a157b16d491..804f62a79e7 100644 --- a/src/vnet/dhcp/dhcp6_pd_client_cp.c +++ b/src/vnet/dhcp/dhcp6_pd_client_cp.c @@ -323,7 +323,7 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) inner_status_code = ntohs (mp->inner_status_code); status_code = ntohs (mp->status_code); - if (mp->msg_type == DHCPV6_MSG_ADVERTISE + if (mp->msg_type == DHCPV6_MSG_API_ADVERTISE && client_state->server_index == ~0) { prefix_info_t *prefix_list = 0, *prefix_info; @@ -341,8 +341,8 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) for (i = 0; i < n_prefixes; i++) { api_prefix = &mp->prefixes[i]; - prefix = (ip6_address_t *) api_prefix->prefix; - prefix_length = api_prefix->prefix_length; + prefix = (ip6_address_t *) api_prefix->prefix.address; + prefix_length = api_prefix->prefix.len; prefix_info = &prefix_list[i]; prefix_info->prefix = *prefix; @@ -358,7 +358,7 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) vec_free (prefix_list); } - if (mp->msg_type != DHCPV6_MSG_REPLY) + if (mp->msg_type != DHCPV6_MSG_API_REPLY) return 0; if (!client_state->rebinding && client_state->server_index != server_index) @@ -398,15 +398,15 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) api_prefix = &mp->prefixes[i]; - prefix = (ip6_address_t *) api_prefix->prefix; - prefix_length = api_prefix->prefix_length; + prefix = (ip6_address_t *) api_prefix->prefix.address; + prefix_length = api_prefix->prefix.len; if (ip6_address_is_link_local_unicast (prefix)) continue; valid_time = ntohl (api_prefix->valid_time); preferred_time = ntohl (api_prefix->preferred_time); - prefix_length = api_prefix->prefix_length; + prefix_length = api_prefix->prefix.len; if (preferred_time > valid_time) continue; |