Use a minimum value of a CLI version and a value of Zebra capabilities.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
/* ripd privileges */
zebra_capabilities_t _caps_p[] = {ZCAP_NET_RAW, ZCAP_BIND, ZCAP_SYS_ADMIN};
+uint32_t zebra_ecmp_count = MULTIPATH_NUM;
+
struct zebra_privs_t ripd_privs = {
#if defined(FRR_USER)
.user = FRR_USER,
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;
/* All information about zebra. */
struct zclient *zclient = NULL;
-uint32_t zebra_ecmp_count = MULTIPATH_NUM;
/* Send ECMP routes to zebra. */
static void rip_zebra_ipv4_send(struct rip *rip, struct route_node *rp,
extern void rip_ecmp_change(struct rip *rip);
+extern uint32_t zebra_ecmp_count;
+
#endif /* _ZEBRA_RIP_H */