aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-09-30 10:53:31 +0000
committerOle Trøan <otroan@employees.org>2019-12-17 10:56:20 +0000
commitcbe25aab3be72154f2c706c39eeba6a77f34450f (patch)
tree131fb53b5ec973be045ffb9e2eb797af01d112a0 /src/plugins/gbp
parent96453fd2417ebd1d69354a7fb692976129cea80e (diff)
ip: Protocol Independent IP Neighbors
Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp')
-rw-r--r--src/plugins/gbp/gbp_endpoint.c22
-rw-r--r--src/plugins/gbp/gbp_route_domain.c1
2 files changed, 6 insertions, 17 deletions
diff --git a/src/plugins/gbp/gbp_endpoint.c b/src/plugins/gbp/gbp_endpoint.c
index c6cab3fbfb8..9ef08904041 100644
--- a/src/plugins/gbp/gbp_endpoint.c
+++ b/src/plugins/gbp/gbp_endpoint.c
@@ -24,13 +24,12 @@
#include <plugins/gbp/gbp_policy_dpo.h>
#include <plugins/gbp/gbp_vxlan.h>
-#include <vnet/ethernet/arp.h>
#include <vnet/l2/l2_input.h>
#include <vnet/l2/l2_output.h>
#include <vnet/l2/feat_bitmap.h>
#include <vnet/l2/l2_fib.h>
#include <vnet/fib/fib_table.h>
-#include <vnet/ip/ip_neighbor.h>
+#include <vnet/ip-neighbor/ip_neighbor.h>
#include <vnet/fib/fib_walk.h>
#include <vnet/vxlan-gbp/vxlan_gbp.h>
@@ -208,12 +207,6 @@ gbp_endpoint_index (const gbp_endpoint_t * ge)
return (ge - gbp_endpoint_pool);
}
-static ip46_type_t
-ip46_address_get_type (const ip46_address_t * a)
-{
- return (ip46_address_is_ip4 (a) ? IP46_TYPE_IP4 : IP46_TYPE_IP6);
-}
-
static int
gbp_endpoint_ip_is_equal (const fib_prefix_t * fp, const ip46_address_t * ip)
{
@@ -775,14 +768,11 @@ gbb_endpoint_fwd_recalc (gbp_endpoint_t * ge)
{
gbp_endpoint_add_itf (gbp_itf_get_sw_if_index (gef->gef_itf),
gei);
- if (FIB_PROTOCOL_IP4 == pfx->fp_proto)
- send_ip4_garp_w_addr (vlib_get_main (),
- &pfx->fp_addr.ip4,
- gg->gg_uplink_sw_if_index);
- else
- send_ip6_na_w_addr (vlib_get_main (),
- &pfx->fp_addr.ip6,
- gg->gg_uplink_sw_if_index);
+ 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);
}
}
}
diff --git a/src/plugins/gbp/gbp_route_domain.c b/src/plugins/gbp/gbp_route_domain.c
index f0aa694d44a..99c6e168a53 100644
--- a/src/plugins/gbp/gbp_route_domain.c
+++ b/src/plugins/gbp/gbp_route_domain.c
@@ -18,7 +18,6 @@
#include <vnet/dpo/dvr_dpo.h>
#include <vnet/fib/fib_table.h>
-#include <vnet/ip/ip_neighbor.h>
/**
* A fixed MAC address to use as the source MAC for packets L3 switched