]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Set resolved inactive when > multipath_num
authorStephen Worley <sworley@cumulusnetworks.com>
Thu, 21 Nov 2019 20:53:59 +0000 (15:53 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Thu, 21 Nov 2019 21:28:31 +0000 (16:28 -0500)
Apparently the multipath_num functionatlity has been broken
for a while because we were ignoring the recusive nexthops
when marking them inactive based on it.

This sets them as inactive as well if the parent breaks it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/zebra_nhg.c

index 019c22891826ac062def3caaeb27ffb3bf4b9625..ba204bda617bb06cf58a737ed28f450dbd1738f3 100644 (file)
@@ -1676,7 +1676,12 @@ int nexthop_active_update(struct route_node *rn, struct route_entry *re)
                        nexthop_active_check(rn, re, nexthop);
 
                if (new_active && curr_active >= zrouter.multipath_num) {
-                       UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
+                       struct nexthop *nh;
+
+                       /* Set it and its resolved nexthop as inactive. */
+                       for (nh = nexthop; nh; nh = nh->resolved)
+                               UNSET_FLAG(nh->flags, NEXTHOP_FLAG_ACTIVE);
+
                        new_active = 0;
                }