diff options
Diffstat (limited to 'src/vnet/ip6-nd')
-rw-r--r-- | src/vnet/ip6-nd/ip6_nd.c | 13 | ||||
-rw-r--r-- | src/vnet/ip6-nd/ip6_nd_proxy.c | 6 | ||||
-rw-r--r-- | src/vnet/ip6-nd/ip6_ra.c | 8 |
3 files changed, 20 insertions, 7 deletions
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); diff --git a/src/vnet/ip6-nd/ip6_nd_proxy.c b/src/vnet/ip6-nd/ip6_nd_proxy.c index 91a13391c4b..ea7ca568946 100644 --- a/src/vnet/ip6-nd/ip6_nd_proxy.c +++ b/src/vnet/ip6-nd/ip6_nd_proxy.c @@ -52,7 +52,11 @@ ip6_nd_proxy_add_del (u32 sw_if_index, const ip6_address_t * addr, u8 is_del) sw_if_index, ~0, 1, FIB_ROUTE_PATH_FLAG_NONE); /* flush the ND cache of this address if it's there */ - ip_neighbor_del (&nh, IP46_TYPE_IP6, sw_if_index); + ip_address_t ip = { + .ip = nh, + .version = AF_IP6, + }; + ip_neighbor_del (&ip, sw_if_index); } else { diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c index 2bfa4251480..97c5b4a2837 100644 --- a/src/vnet/ip6-nd/ip6_ra.c +++ b/src/vnet/ip6-nd/ip6_ra.c @@ -368,11 +368,15 @@ icmp6_router_solicitation (vlib_main_t * vm, if (PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 && !is_unspecified && !is_link_local)) { + /* *INDENT-OFF* */ ip_neighbor_learn_t learn = { - .type = IP46_TYPE_IP6, .sw_if_index = sw_if_index0, - .ip.ip6 = ip0->src_address, + .ip = { + .ip.ip6 = ip0->src_address, + .version = AF_IP6, + }, }; + /* *INDENT-ON* */ memcpy (&learn.mac, o0->ethernet_address, sizeof (learn.mac)); ip_neighbor_learn_dp (&learn); } |