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/plugins/gbp/gbp_endpoint.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/plugins/gbp/gbp_endpoint.c') diff --git a/src/plugins/gbp/gbp_endpoint.c b/src/plugins/gbp/gbp_endpoint.c index e1a810cf222..9cc69d01277 100644 --- a/src/plugins/gbp/gbp_endpoint.c +++ b/src/plugins/gbp/gbp_endpoint.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include #include @@ -768,11 +770,16 @@ gbb_endpoint_fwd_recalc (gbp_endpoint_t * ge) { gbp_endpoint_add_itf (gbp_itf_get_sw_if_index (gef->gef_itf), gei); - ip_neighbor_advertise (vlib_get_main (), - (FIB_PROTOCOL_IP4 == pfx->fp_proto ? - IP46_TYPE_IP4 : - IP46_TYPE_IP6), - &pfx->fp_addr, gg->gg_uplink_sw_if_index); + if (FIB_PROTOCOL_IP4 == pfx->fp_proto) + ip4_neighbor_advertise (vlib_get_main (), + vnet_get_main (), + gg->gg_uplink_sw_if_index, + &pfx->fp_addr.ip4); + else + ip6_neighbor_advertise (vlib_get_main (), + vnet_get_main (), + gg->gg_uplink_sw_if_index, + &pfx->fp_addr.ip6); } } } -- cgit 1.2.3-korg