From 0b4dadb3858667a858c20aac9c6b854aaf2ebdf9 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Wed, 23 Oct 2019 14:08:12 -0400 Subject: [PATCH] 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 --- zebra/zebra_nhg.c | 3 +-- 1 file changed, 1 insertion(+), 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; -- 2.39.5