From abc246e19345cbd2bc74c7dc50dac0b9cf2addf8 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Thu, 17 Feb 2022 09:53:25 -0500 Subject: [PATCH] staticd: capture zebra's advertised ECMP limit Capture the ECMP limit advertised by zebra (via zapi). Signed-off-by: Mark Stapp --- staticd/static_main.c | 2 +- staticd/static_routes.h | 1 + staticd/static_zebra.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/staticd/static_main.c b/staticd/static_main.c index 6051b2df1c..3bd784b594 100644 --- a/staticd/static_main.c +++ b/staticd/static_main.c @@ -43,7 +43,7 @@ char backup_config_file[256]; bool mpls_enabled; - +uint32_t zebra_ecmp_count = MULTIPATH_NUM; zebra_capabilities_t _caps_p[] = { }; diff --git a/staticd/static_routes.h b/staticd/static_routes.h index c901a8926a..71c3689be5 100644 --- a/staticd/static_routes.h +++ b/staticd/static_routes.h @@ -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; diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 311aeda338..a62225294a 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -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)