]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_rib.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / zebra / zebra_rib.c
index c7ad2508fe4e91bca0ba9cd3a3e03582fd600a8b..5d6eac75330d0590ddf93e294882800bb0527a9a 100644 (file)
@@ -971,7 +971,18 @@ static int nexthop_active_update(struct route_node *rn, struct route_entry *re,
                prev_src = nexthop->rmap_src;
                prev_active = CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
                prev_index = nexthop->ifindex;
-               if ((new_active = nexthop_active_check(rn, re, nexthop, set)))
+               /*
+                * We need to respect the multipath_num here
+                * as that what we should be able to install from
+                * a multipath perpsective should not be a data plane
+                * decision point.
+                */
+               new_active = nexthop_active_check(rn, re, nexthop, set);
+               if (new_active && re->nexthop_active_num >= multipath_num) {
+                       UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
+                       new_active = 0;
+               }
+               if (new_active)
                        re->nexthop_active_num++;
                /* Don't allow src setting on IPv6 addr for now */
                if (prev_active != new_active || prev_index != nexthop->ifindex
@@ -1872,7 +1883,7 @@ static void rib_process_after(struct zebra_dplane_ctx *ctx)
                                zvrf->removals++;
                } else {
                        zsend_route_notify_owner_ctx(ctx,
-                                                    ZAPI_ROUTE_FAIL_INSTALL);
+                                                    ZAPI_ROUTE_REMOVE_FAIL);
 
                        zlog_warn("%u:%s: Route Deletion failure",
                                  dplane_ctx_get_vrf(ctx),
@@ -2284,6 +2295,7 @@ static void rib_queue_init(struct zebra_t *zebra)
        /* XXX: TODO: These should be runtime configurable via vty */
        zebra->ribq->spec.max_retries = 3;
        zebra->ribq->spec.hold = ZEBRA_RIB_PROCESS_HOLD_TIME;
+       zebra->ribq->spec.retry = ZEBRA_RIB_PROCESS_RETRY_TIME;
 
        if (!(zebra->mq = meta_queue_new())) {
                flog_err(EC_ZEBRA_WQ_NONEXISTENT,