diff options
Diffstat (limited to 'src/plugins/gbp/gbp_endpoint.c')
-rw-r--r-- | src/plugins/gbp/gbp_endpoint.c | 17 |
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); } } } |