summaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-08-20 08:22:56 +0000
committerOle Tr�an <otroan@employees.org>2020-11-20 10:27:01 +0000
commitdc617b8df442f3e25197ec64ffd58d11411b0470 (patch)
treea573462413e12b71d71515f84e53900686424917 /src/plugins/gbp
parentd01d2ce4498dae4cbcba65784babe91d56d4bae9 (diff)
ip-neighbor: Use ip_address_t rather than ip46_address_t
Type: improvement Change-Id: Ica5f395075677bda5f38d28e704f65350af88610 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp')
-rw-r--r--src/plugins/gbp/gbp_endpoint.c17
1 files changed, 12 insertions, 5 deletions
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 <vnet/l2/l2_fib.h>
#include <vnet/fib/fib_table.h>
#include <vnet/ip-neighbor/ip_neighbor.h>
+#include <vnet/ip-neighbor/ip4_neighbor.h>
+#include <vnet/ip-neighbor/ip6_neighbor.h>
#include <vnet/fib/fib_walk.h>
#include <vnet/vxlan-gbp/vxlan_gbp.h>
@@ -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);
}
}
}