summaryrefslogtreecommitdiff
path: root/zebra/rib.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@labn.net>2023-06-28 08:11:41 -0400
committerMark Stapp <mjs@labn.net>2023-07-10 16:43:53 -0400
commitbb58cad150cd626a780b091b61a2d2ca6235e1e3 (patch)
treef48800bbe1f713261b4bbc96fdf0904fcc7bfb47 /zebra/rib.h
parent281e7685c1dc4c242d780323be66c766a531c7bd (diff)
zebra: use NHRP routes as valid in nexthop check
Treat NHRP-installed routes as valid, as if they were CONNECTED routes, when checking candidate routes' nexthops for validity. This allows use of NHRP by an IGP, for example, that doesn't normally want recursive nexthop resolution. Signed-off-by: Mark Stapp <mjs@labn.net>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index 65cc1ffab9..64bbaf3e76 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -167,6 +167,10 @@ struct route_entry {
#define RIB_KERNEL_ROUTE(R) RKERNEL_ROUTE((R)->type)
+/* Define route types that are equivalent to "connected". */
+#define RIB_CONNECTED_ROUTE(R) \
+ ((R)->type == ZEBRA_ROUTE_CONNECT || (R)->type == ZEBRA_ROUTE_NHRP)
+
/* meta-queue structure:
* sub-queue 0: nexthop group objects
* sub-queue 1: EVPN/VxLAN objects