From dc617b8df442f3e25197ec64ffd58d11411b0470 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 20 Aug 2020 08:22:56 +0000 Subject: ip-neighbor: Use ip_address_t rather than ip46_address_t Type: improvement Change-Id: Ica5f395075677bda5f38d28e704f65350af88610 Signed-off-by: Neale Ranns --- src/vnet/ip6-nd/ip6_nd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/vnet/ip6-nd/ip6_nd.c') diff --git a/src/vnet/ip6-nd/ip6_nd.c b/src/vnet/ip6-nd/ip6_nd.c index da4966657c7..917abddf7bb 100644 --- a/src/vnet/ip6-nd/ip6_nd.c +++ b/src/vnet/ip6-nd/ip6_nd.c @@ -157,12 +157,17 @@ icmp6_neighbor_solicitation_or_advertisement (vlib_main_t * vm, if (PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 && !ip6_sadd_unspecified)) { + /* *INDENT-OFF* */ ip_neighbor_learn_t learn = { .sw_if_index = sw_if_index0, - .type = IP46_TYPE_IP6, - .ip.ip6 = (is_solicitation ? - ip0->src_address : h0->target_address), + .ip = { + .version = AF_IP6, + .ip.ip6 = (is_solicitation ? + ip0->src_address : + h0->target_address), + } }; + /* *INDENT-ON* */ memcpy (&learn.mac, o0->ethernet_address, sizeof (learn.mac)); ip_neighbor_learn_dp (&learn); } @@ -459,7 +464,7 @@ ip6_nd_init (vlib_main_t * vm) icmp6_register_type (vm, ICMP6_neighbor_advertisement, ip6_icmp_neighbor_advertisement_node.index); - ip_neighbor_register (IP46_TYPE_IP6, &ip6_nd_impl_vft); + ip_neighbor_register (AF_IP6, &ip6_nd_impl_vft); ip6_nd_delegate_id = ip6_link_delegate_register (&ip6_nd_delegate_vft); -- cgit 1.2.3-korg