diff options
author | Mark Stapp <mjs@labn.net> | 2023-09-29 18:08:17 +0200 |
---|---|---|
committer | Mark Stapp <mjs@labn.net> | 2023-09-29 18:08:17 +0200 |
commit | 0da89ac98553f53718cbbd610d36cb2ceada14d4 (patch) | |
tree | 31ed2377584a3fe1b8499cced0359a35aa356df6 | |
parent | Merge pull request #14467 from cscarpitta/bugfix/fix-srv6-isis-memleaks (diff) | |
download | frr-0da89ac98553f53718cbbd610d36cb2ceada14d4.tar.xz frr-0da89ac98553f53718cbbd610d36cb2ceada14d4.zip |
zebra: be more careful removing 'installed' flag from nhgs
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 <mjs@labn.net>
-rw-r--r-- | zebra/zebra_nhg.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 9588f65fc..1879bafca 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -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, |