]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Check depends for validity, not dependents
authorStephen Worley <sworley@cumulusnetworks.com>
Wed, 23 Oct 2019 18:08:12 +0000 (14:08 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:44 +0000 (11:13 -0400)
When determining whether to set the nhg_hash_entry as
invalid, we should have been checking the depends, not
the dependents. If its a group and at least one of its
depends is valid, the group is still valid.

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

index 38ff7c60de37dfa88adab6c91db2f3e5fd5c3a9e..9afecbd909145f9f94f35f65463838ac3535e571 100644 (file)
@@ -1081,8 +1081,7 @@ void zebra_nhg_set_invalid(struct nhg_hash_entry *nhe)
                struct nhg_connected *rb_node_dep = NULL;
 
                /* If anthing else in the group is valid, the group is valid */
-               frr_each(nhg_connected_tree, &nhe->nhg_dependents,
-                         rb_node_dep) {
+               frr_each(nhg_connected_tree, &nhe->nhg_depends, rb_node_dep) {
                        if (CHECK_FLAG(rb_node_dep->nhe->flags,
                                       NEXTHOP_GROUP_VALID))
                                return;