From 1b839d486a8a392f9122bb5483b26540603e7550 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 17 May 2023 22:47:56 +0300 Subject: ripd: Make sure we do not overuse higher values for ECMP count Use a minimum value of a CLI version and a value of Zebra capabilities. Signed-off-by: Donatas Abraitis --- ripd/rip_nb_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ripd/rip_nb_config.c') diff --git a/ripd/rip_nb_config.c b/ripd/rip_nb_config.c index 1117ec9ff7..8d3b670596 100644 --- a/ripd/rip_nb_config.c +++ b/ripd/rip_nb_config.c @@ -99,7 +99,8 @@ int ripd_instance_allow_ecmp_modify(struct nb_cb_modify_args *args) return NB_OK; rip = nb_running_get_entry(args->dnode, NULL, true); - rip->ecmp = yang_dnode_get_uint8(args->dnode, NULL); + rip->ecmp = + MIN(yang_dnode_get_uint8(args->dnode, NULL), zebra_ecmp_count); if (!rip->ecmp) { rip_ecmp_disable(rip); return NB_OK; -- cgit v1.2.3