summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_flood.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-10-06 02:25:55 +0200
committerRenato Westphal <renato@opensourcerouting.org>2021-10-06 02:25:55 +0200
commit9e49d1aca2859863cf0fc270a70a91a7cf2f08fb (patch)
treef070710ed59d2deb811ad26553d74fce782f5ca4 /ospf6d/ospf6_flood.c
parentospf6d: fix selection of NSSA forwarding address (diff)
downloadfrr-9e49d1aca2859863cf0fc270a70a91a7cf2f08fb.tar.xz
frr-9e49d1aca2859863cf0fc270a70a91a7cf2f08fb.zip
ospf6d: be careful to not refresh translated Type-5 LSAs twice
The ABR task already takes care of refreshing translated Type-5 LSAs that correspond to self-originated Type-7 LSAs. There's no need to do that in ospf_external_lsa_install() as well. The ospfd NSSA code takes the same precaution. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_flood.c')
-rw-r--r--ospf6d/ospf6_flood.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index 6ad2a70f0..e48ed72c0 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -266,10 +266,14 @@ void ospf6_decrement_retrans_count(struct ospf6_lsa *lsa)
/* RFC2328 section 13.2 Installing LSAs in the database */
void ospf6_install_lsa(struct ospf6_lsa *lsa)
{
+ struct ospf6 *ospf6;
struct timeval now;
struct ospf6_lsa *old;
struct ospf6_area *area = NULL;
+ ospf6 = ospf6_get_by_lsdb(lsa);
+ assert(ospf6);
+
/* Remove the old instance from all neighbors' Link state
retransmission list (RFC2328 13.2 last paragraph) */
old = ospf6_lsdb_lookup(lsa->header->type, lsa->header->id,
@@ -330,20 +334,14 @@ void ospf6_install_lsa(struct ospf6_lsa *lsa)
&& !CHECK_FLAG(lsa->flag, OSPF6_LSA_DUPLICATE)) {
/* check if it is new lsa ? or existing lsa got modified ?*/
- if (!old || OSPF6_LSA_IS_CHANGED(old, lsa)) {
- struct ospf6 *ospf6;
-
- ospf6 = ospf6_get_by_lsdb(lsa);
-
- assert(ospf6);
-
+ if (!old || OSPF6_LSA_IS_CHANGED(old, lsa))
ospf6_helper_handle_topo_chg(ospf6, lsa);
- }
}
ospf6_lsdb_add(lsa, lsa->lsdb);
- if (ntohs(lsa->header->type) == OSPF6_LSTYPE_TYPE_7) {
+ if (ntohs(lsa->header->type) == OSPF6_LSTYPE_TYPE_7
+ && lsa->header->adv_router != ospf6->router_id) {
area = OSPF6_AREA(lsa->lsdb->data);
ospf6_translated_nssa_refresh(area, lsa, NULL);
ospf6_schedule_abr_task(area->ospf6);