summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-05-13 12:50:14 -0700
committerStephen Worley <sworley@cumulusnetworks.com>2020-09-28 12:40:59 -0400
commit6c67f41f9e39bca29416c38eecc74ec729d1d60f (patch)
tree3ec3d87697438c4ffc35d5f685d113eb5a109a4b /lib/zclient.c
parent0885b1e3d90b1fa4d84c7e7a5fb775ba397c4103 (diff)
zebra,lib: command to only install proto-based nexthops
Add a command/functionality to only install proto-based nexthops. That is nexthops owned/created by upper level protocols, not ones implicitly created by zebra. There are some scenarios where you would not want zebra to be arbitrarily installing nexthop groups and but you still want to use ones you have control over via lib/nexthop_group config and an upper level protocol. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 17026d13a6..deb5f519bd 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -4083,3 +4083,11 @@ uint32_t zclient_get_nhg_start(uint32_t proto)
return ZEBRA_NHG_SPACING * proto;
}
+
+/*
+ * Where do routing protocols IDs start overall (first ID after zebra)
+ */
+uint32_t zclient_get_nhg_lower_bound()
+{
+ return ZEBRA_NHG_SPACING * (ZEBRA_ROUTE_CONNECT + 1);
+}