diff options
author | Mobashshera Rasool <mrasool@vmware.com> | 2021-08-09 13:57:11 +0200 |
---|---|---|
committer | Mobashshera Rasool <mrasool@vmware.com> | 2021-08-09 18:11:10 +0200 |
commit | 523232c5c5a073e2c8c3f1143ff12732b0931ea1 (patch) | |
tree | 07f98dfc362ed3468d25693a669e874eb96384af /ospf6d/ospf6_flood.c | |
parent | ospf6d: Remove assert and fix LSA removal in ASBR summarisation (diff) | |
download | frr-523232c5c5a073e2c8c3f1143ff12732b0931ea1.tar.xz frr-523232c5c5a073e2c8c3f1143ff12732b0931ea1.zip |
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 3d5259716..5a4dd72b6 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) |