summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2021-02-25 11:12:34 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2021-04-09 18:29:58 +0200
commit0a27a2fef5bfd6135d7deed8c0bab6a42e30568a (patch)
treec94cfc939367cd11d4bb06210772bd8a787300e5 /zebra/zebra_rib.c
parentzebra: handler for configuring neighbor table (diff)
downloadfrr-0a27a2fef5bfd6135d7deed8c0bab6a42e30568a.tar.xz
frr-0a27a2fef5bfd6135d7deed8c0bab6a42e30568a.zip
zebra, lib: handle NEIGH_ADD/DELETE to zebra dataplane framework
EVPN neighbor operations were already done in the zebra dataplane framework. Now that NHRP is able to use zebra to perform neighbor IP operations (by programming link IP operations), handle this operation under dataplane framework: - assign two new operations NEIGH_IP_INSTALL and NEIGH_IP_DELETE; this is reserved for GRE like interfaces: example: ip neigh add A.B.C.D lladdr E.F.G.H - use 'struct ipaddr' to store and encode the link ip address - reuse dplane_neigh_info, and create an union with mac address - reuse the protocol type and use it for neighbor operations; this permits to store the daemon originating this neighbor operation. a new route type is created: ZEBRA_ROUTE_NEIGH. - the netlink level functions will handle a pointer, and a type; the type indicates the family of the pointer: AF_INET or AF_INET6 if the link type is an ip address, mac address otherwise. - to keep backward compatibility with old queries, as no extension was done, an option NEIGH_NO_EXTENSION has been put in place - also, 2 new state flags are used: NUD_PERMANENT and NUD_FAILED. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to '')
-rw-r--r--zebra/zebra_rib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index ffe4be855..807c9f0e8 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -112,6 +112,7 @@ static const struct {
[ZEBRA_ROUTE_OPENFABRIC] = {ZEBRA_ROUTE_OPENFABRIC, 115, 4},
[ZEBRA_ROUTE_VRRP] = {ZEBRA_ROUTE_VRRP, 255, 6},
[ZEBRA_ROUTE_SRTE] = {ZEBRA_ROUTE_SRTE, 255, 6},
+ [ZEBRA_ROUTE_NEIGH] = {ZEBRA_ROUTE_NEIGH, 255, 6},
/* Any new route type added to zebra, should be mirrored here */
/* no entry/default: 150 */
@@ -3924,6 +3925,8 @@ static int rib_process_dplane_results(struct thread *thread)
case DPLANE_OP_NEIGH_INSTALL:
case DPLANE_OP_NEIGH_UPDATE:
case DPLANE_OP_NEIGH_DELETE:
+ case DPLANE_OP_NEIGH_IP_INSTALL:
+ case DPLANE_OP_NEIGH_IP_DELETE:
case DPLANE_OP_VTEP_ADD:
case DPLANE_OP_VTEP_DELETE:
case DPLANE_OP_NEIGH_DISCOVER: