summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-10-23 14:08:12 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 11:13:44 -0400
commit0b4dadb3858667a858c20aac9c6b854aaf2ebdf9 (patch)
tree11bcaa7448f55c3b0b9dcacfb523928e1e734ad6
parent5a935f79d5c6990b899862de6e3022036e4a7ffa (diff)
zebra: Check depends for validity, not dependents
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>
-rw-r--r--zebra/zebra_nhg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 38ff7c60de..9afecbd909 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -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;