diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2021-10-04 21:13:50 -0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-04 21:13:50 -0300 | 
| commit | 5b9414484cb5e10973084108b66181938eab43eb (patch) | |
| tree | a4eab5b49892cc38ad79996d76c1738a4066aea7 | |
| parent | fd7abfa80b85190bbb790730d11f1d31e7c45669 (diff) | |
| parent | fc3f4adbc6bd0ecd391906930cf10c00c61ae695 (diff) | |
Merge pull request #9726 from donaldsharp/ospf6_expire
ospf6d: Ensure expire thread is properly stopped
| -rw-r--r-- | ospf6d/ospf6_flood.c | 1 | ||||
| -rw-r--r-- | ospf6d/ospf6_nssa.c | 16 | 
2 files changed, 4 insertions, 13 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 186eac35a5..3a242575cd 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -288,7 +288,6 @@ void ospf6_install_lsa(struct ospf6_lsa *lsa)  	monotime(&now);  	if (!OSPF6_LSA_IS_MAXAGE(lsa)) { -		lsa->expire = NULL;  		thread_add_timer(master, ospf6_lsa_expire, lsa,  				 OSPF_LSA_MAXAGE + lsa->birth.tv_sec  					 - now.tv_sec, 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);  		}  	}  | 
