summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_nssa.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-10-04 08:37:16 -0400
committerDonald Sharp <sharpd@nvidia.com>2021-10-04 12:13:57 -0400
commitfc3f4adbc6bd0ecd391906930cf10c00c61ae695 (patch)
tree0064adbee3930a632a56e57b9651143a5329ecd2 /ospf6d/ospf6_nssa.c
parenta3e036f36a55701325435035b836382fa0061c2b (diff)
ospf6d: Ensure expire thread is properly stopped
The lsa->expire thread is for keeping track of when we are expecting to expire(remove/delete) a lsa. There are situations where we just decide to straight up delete the lsa, but we are not ensuring that the lsa is not already setup for expiration. In that case just stop the expiry thread and do the deletion. Additionally there was a case where ospf6d was just dropping the fact that a thread was already scheduled for expiration. In that case we should just setup the timer again and it will reset it appropriately. Fixes: #9721 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_nssa.c')
-rw-r--r--ospf6d/ospf6_nssa.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c
index 2339d339f7..809768fb5c 100644
--- a/ospf6d/ospf6_nssa.c
+++ b/ospf6d/ospf6_nssa.c
@@ -304,24 +304,16 @@ void ospf6_abr_remove_unapproved_summaries(struct ospf6 *ospf6)
type = htons(OSPF6_LSTYPE_INTER_ROUTER);
for (ALL_LSDB_TYPED_ADVRTR(area->lsdb, type, ospf6->router_id,
lsa)) {
- if (CHECK_FLAG(lsa->flag, OSPF6_LSA_UNAPPROVED)) {
- lsa->header->age = htons(OSPF_LSA_MAXAGE);
- THREAD_OFF(lsa->refresh);
- thread_execute(master, ospf6_lsa_expire, lsa,
- 0);
- }
+ if (CHECK_FLAG(lsa->flag, OSPF6_LSA_UNAPPROVED))
+ ospf6_lsa_premature_aging(lsa);
}
/* Inter area prefix LSA */
type = htons(OSPF6_LSTYPE_INTER_PREFIX);
for (ALL_LSDB_TYPED_ADVRTR(area->lsdb, type, ospf6->router_id,
lsa)) {
- if (CHECK_FLAG(lsa->flag, OSPF6_LSA_UNAPPROVED)) {
- lsa->header->age = htons(OSPF_LSA_MAXAGE);
- THREAD_OFF(lsa->refresh);
- thread_execute(master, ospf6_lsa_expire, lsa,
- 0);
- }
+ if (CHECK_FLAG(lsa->flag, OSPF6_LSA_UNAPPROVED))
+ ospf6_lsa_premature_aging(lsa);
}
}