]> git.proxmox.com Git - mirror_frr.git/commitdiff
staticd: capture zebra's advertised ECMP limit
authorMark Stapp <mstapp@nvidia.com>
Thu, 17 Feb 2022 14:53:25 +0000 (09:53 -0500)
committermergify-bot <noreply@mergify.com>
Fri, 18 Feb 2022 00:52:51 +0000 (00:52 +0000)
Capture the ECMP limit advertised by zebra (via zapi).

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
(cherry picked from commit abc246e19345cbd2bc74c7dc50dac0b9cf2addf8)

staticd/static_main.c
staticd/static_routes.h
staticd/static_zebra.c

index 6051b2df1c8febc3c5acd24620a8e4f2c91bf6be..3bd784b59453860019e556ae7c2af12dc5c0e9af 100644 (file)
@@ -43,7 +43,7 @@
 char backup_config_file[256];
 
 bool mpls_enabled;
-
+uint32_t zebra_ecmp_count = MULTIPATH_NUM;
 
 zebra_capabilities_t _caps_p[] = {
 };
index c901a8926a437a2352914131c31b67eda497389d..71c3689be54ad3eb60e6d41b64a7350cda18721e 100644 (file)
@@ -163,6 +163,7 @@ static_route_info_from_rnode(struct route_node *rn)
 }
 
 extern bool mpls_enabled;
+extern uint32_t zebra_ecmp_count;
 
 extern struct zebra_privs_t static_privs;
 
index 311aeda3385118fef6cb7123c612585852f8fb83..a62225294aedc48552f760c6f4d285a050c59bab 100644 (file)
@@ -205,6 +205,7 @@ static int static_zebra_nexthop_update(ZAPI_CALLBACK_ARGS)
 static void static_zebra_capabilities(struct zclient_capabilities *cap)
 {
        mpls_enabled = cap->mpls_enabled;
+       zebra_ecmp_count = cap->ecmp;
 }
 
 static unsigned int static_nht_hash_key(const void *data)