diff options
| author | Russ White <russ@riw.us> | 2025-03-19 08:10:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-19 08:10:15 -0400 |
| commit | d5b864ebee64739c721fc25e18709bdd2112967e (patch) | |
| tree | d750da843c19476469682c93b23bf00db0390c78 /zebra | |
| parent | b06dd2ccacc6403fec042687ab12ed04ed390176 (diff) | |
| parent | de168795ab5d75151f1b410fcdad88e2c28ef40e (diff) | |
Merge pull request #18374 from raja-rajasekar/rajasekarr/nhg_intf_flap_issue
zebra: Fix reinstalling nexthops in NHGs upon interface flaps
Diffstat (limited to 'zebra')
| -rw-r--r-- | zebra/zebra_nhg.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 5b7452a79e..589196ecb9 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1165,11 +1165,29 @@ static void zebra_nhg_handle_install(struct nhg_hash_entry *nhe, bool install) { /* Update validity of groups depending on it */ struct nhg_connected *rb_node_dep; + struct nhg_connected *rb_node_indirect_dep = NULL; frr_each_safe (nhg_connected_tree, &nhe->nhg_dependents, rb_node_dep) { zebra_nhg_set_valid(rb_node_dep->nhe, true); /* install dependent NHG into kernel */ if (install) { + if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED) && + CHECK_FLAG(rb_node_dep->nhe->flags, NEXTHOP_GROUP_RECURSIVE)) { + frr_each_safe (nhg_connected_tree, &rb_node_dep->nhe->nhg_dependents, + rb_node_indirect_dep) { + SET_FLAG(rb_node_indirect_dep->nhe->flags, + NEXTHOP_GROUP_REINSTALL); + if (IS_ZEBRA_DEBUG_NHG_DETAIL) + zlog_debug("%s nh id %u (flags 0x%x) associated dependents NHG %pNG (flags 0x%x) Re-install", + __func__, rb_node_dep->nhe->id, + rb_node_dep->nhe->flags, + rb_node_indirect_dep->nhe, + rb_node_indirect_dep->nhe->flags); + zebra_nhg_install_kernel(rb_node_indirect_dep->nhe, + ZEBRA_ROUTE_MAX); + } + } + if (IS_ZEBRA_DEBUG_NHG_DETAIL) zlog_debug( "%s nh id %u (flags 0x%x) associated dependent NHG %pNG install", |
