Merge pull request #15184 from donaldsharp/zebra_touchups

Zebra touchups
This commit is contained in:
Donatas Abraitis 2024-01-21 17:02:26 +02:00 committed by GitHub
commit f6178ee2e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 9 deletions

View File

@ -171,18 +171,13 @@ static int if_zebra_new_hook(struct interface *ifp)
return 0;
}
static void if_nhg_dependents_check_valid(struct nhg_hash_entry *nhe)
{
zebra_nhg_check_valid(nhe);
}
static void if_down_nhg_dependents(const struct interface *ifp)
{
struct nhg_connected *rb_node_dep = NULL;
struct zebra_if *zif = (struct zebra_if *)ifp->info;
frr_each(nhg_connected_tree, &zif->nhg_dependents, rb_node_dep)
if_nhg_dependents_check_valid(rb_node_dep->nhe);
zebra_nhg_check_valid(rb_node_dep->nhe);
}
static void if_nhg_dependents_release(const struct interface *ifp)
@ -192,7 +187,7 @@ static void if_nhg_dependents_release(const struct interface *ifp)
frr_each(nhg_connected_tree, &zif->nhg_dependents, rb_node_dep) {
rb_node_dep->nhe->ifp = NULL; /* Null it out */
if_nhg_dependents_check_valid(rb_node_dep->nhe);
zebra_nhg_check_valid(rb_node_dep->nhe);
}
}

View File

@ -1082,11 +1082,10 @@ void zebra_nhg_check_valid(struct nhg_hash_entry *nhe)
frr_each(nhg_connected_tree, &nhe->nhg_depends, rb_node_dep) {
if (CHECK_FLAG(rb_node_dep->nhe->flags, NEXTHOP_GROUP_VALID)) {
valid = true;
goto done;
break;
}
}
done:
if (valid)
zebra_nhg_set_valid(nhe);
else