diff options
-rw-r--r-- | ospf6d/ospf6_asbr.c | 16 | ||||
-rw-r--r-- | ospf6d/ospf6_flood.c | 19 |
2 files changed, 18 insertions, 17 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 0762425a1..2d70f816e 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1514,8 +1514,6 @@ static void ospf6_asbr_external_lsa_remove_by_id(struct ospf6 *ospf6, uint32_t id) { struct ospf6_lsa *lsa; - struct ospf6_area *oa; - struct listnode *lnode; lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL), htonl(id), ospf6->router_id, ospf6->lsdb); @@ -1524,20 +1522,6 @@ static void ospf6_asbr_external_lsa_remove_by_id(struct ospf6 *ospf6, ospf6_external_lsa_purge(ospf6, lsa); - /* Delete the NSSA LSA */ - for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, lnode, oa)) { - lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_TYPE_7), - htonl(id), ospf6->router_id, - oa->lsdb); - if (lsa) { - if (IS_OSPF6_DEBUG_ASBR) - zlog_debug("withdraw type 7 lsa, LS ID: %u", - htonl(id)); - - ospf6_lsa_purge(lsa); - } - } - } static void 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) |