Skip to content

Commit

Permalink
zebra: be more careful removing 'installed' flag from nhgs
Browse files Browse the repository at this point in the history
When interface addresses change, we examine nhgs associated
with the interface in case they need to be reinstalled. As
part of that, we may need to reinstall ecmp nhgs that use the
interface being examined - but not always.

Signed-off-by: Mark Stapp <[email protected]>
  • Loading branch information
Mark Stapp committed Sep 29, 2023
1 parent 1c829fa commit 0da89ac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zebra/zebra_nhg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3748,8 +3748,13 @@ void zebra_interface_nhg_reinstall(struct interface *ifp)
rb_node_dep->nhe->flags);
zebra_nhg_install_kernel(rb_node_dep->nhe);

/* mark depedent uninstall, when interface associated
* singleton is installed, install depedent
/* Don't need to modify dependents if installed */
if (CHECK_FLAG(rb_node_dep->nhe->flags,
NEXTHOP_GROUP_INSTALLED))
continue;

/* mark dependent uninstalled; when interface associated
* singleton is installed, install dependent
*/
frr_each_safe (nhg_connected_tree,
&rb_node_dep->nhe->nhg_dependents,
Expand Down

0 comments on commit 0da89ac

Please sign in to comment.