diff options
| author | Mobashshera Rasool <mrasool@vmware.com> | 2021-08-09 04:57:11 -0700 | 
|---|---|---|
| committer | Mobashshera Rasool <mrasool@vmware.com> | 2021-08-09 09:11:10 -0700 | 
| commit | 523232c5c5a073e2c8c3f1143ff12732b0931ea1 (patch) | |
| tree | 07f98dfc362ed3468d25693a669e874eb96384af /ospf6d/ospf6_flood.c | |
| parent | 4e0702dc746a0dbf8c0a221b3ab7e15e12f21d05 (diff) | |
ospf6d: Remove Type-7 LSA when Type-5 LSA is removed
Fix:
When summarised Type-5 LSA is removed, the corresponding Type-7
LSAs also need to be removed from area.
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_flood.c')
| -rw-r--r-- | ospf6d/ospf6_flood.c | 19 | 
1 files changed, 18 insertions, 1 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 3d52597161..5a4dd72b66 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -169,9 +169,26 @@ void ospf6_remove_id_from_external_id_table(struct ospf6 *ospf6,  void ospf6_external_lsa_purge(struct ospf6 *ospf6, struct ospf6_lsa *lsa)  { +	uint32_t id = lsa->header->id; +	struct ospf6_area *oa; +	struct listnode *lnode; +  	ospf6_lsa_purge(lsa); -	ospf6_remove_id_from_external_id_table(ospf6, lsa->header->id); +	ospf6_remove_id_from_external_id_table(ospf6, id); + +	/* Delete the corresponding NSSA LSA */ +	for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, lnode, oa)) { +		lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_TYPE_7), id, +					ospf6->router_id, oa->lsdb); +		if (lsa) { +			if (IS_OSPF6_DEBUG_NSSA) +				zlog_debug("withdraw type 7 lsa, LS ID: %u", +					   htonl(id)); + +			ospf6_lsa_purge(lsa); +		} +	}  }  void ospf6_lsa_purge(struct ospf6_lsa *lsa)  | 
