Merge pull request #15598 from louis-6wind/fix-nhg-iface

zebra: fix rejected route due to wrong nexthop-group
This commit is contained in:
Mark Stapp 2024-03-26 11:49:03 -04:00 committed by GitHub
commit 498967799d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -176,6 +176,10 @@ 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 */
zebra_nhg_check_valid(rb_node_dep->nhe);
if (CHECK_FLAG(rb_node_dep->nhe->flags,
NEXTHOP_GROUP_KEEP_AROUND) &&
rb_node_dep->nhe->refcnt == 1)
zebra_nhg_decrement_ref(rb_node_dep->nhe);
}
}