summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2003-04-13 21:42:11 +0000
committerpaul <paul>2003-04-13 21:42:11 +0000
commit645878f10fad10f3503da9103bc57bbd96785947 (patch)
tree1dad7dcf36c3bccd34c6cba4e158599cd665c9c4
parente05fba43875e86ba2ec6e3970e5ec3aa2d0e040c (diff)
From: Hasso Tepper <hasso@estpak.ee>
To: zebra@zebra.org Subject: [zebra 18648] [PATCH] Selforiginated Type-7 LSA's are not flushed from lsdb
-rw-r--r--ChangeLog2
-rw-r--r--ospfd/ospf_lsa.c41
-rw-r--r--ospfd/ospf_lsa.h1
3 files changed, 44 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f153293..ecee45f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
* Amir: Opaque LSA bug fix for deletion of Type11's
* configure.ac: use --localstatedir for Unix sockets
+ * Hasso Tepper: When flushing as-ext LSAs flush associated NSSA
+ LSAs.
2003-04-04 Paul Jakma <paul@dishone.st>
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 0facaf08..0d1485b4 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -1860,6 +1860,42 @@ ospf_default_originate_timer (struct thread *thread)
return 0;
}
+#ifdef HAVE_NSSA
+/* Flush any NSSA LSAs for given prefix */
+void
+ospf_nssa_lsa_flush (struct ospf *ospf, struct prefix_ipv4 *p)
+{
+ struct listnode *node;
+ struct ospf_lsa *lsa;
+ struct ospf_area *area;
+
+ if (ospf->anyNSSA)
+ {
+ for (node = listhead (ospf->areas); node; nextnode (node))
+ {
+ if (((area = getdata (node)) != NULL)
+ && (area->external_routing == OSPF_AREA_NSSA))
+ {
+ if (!(lsa = ospf_lsa_lookup (area, OSPF_AS_NSSA_LSA, p->prefix,
+ ospf->router_id)))
+ {
+ if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
+ zlog_warn ("LSA: There is no such AS-NSSA-LSA %s/%d in LSDB",
+ inet_ntoa (p->prefix), p->prefixlen);
+ return;
+ }
+ ospf_ls_retransmit_delete_nbr_as (ospf, lsa);
+ if (!IS_LSA_MAXAGE (lsa))
+ {
+ ospf_refresher_unregister_lsa (ospf, lsa);
+ ospf_lsa_flush_as (ospf, lsa);
+ }
+ }
+ }
+ }
+}
+#endif /* HAVE_NSSA */
+
/* Flush an AS-external-LSA from LSDB and routing domain. */
void
ospf_external_lsa_flush (struct ospf *ospf,
@@ -1899,6 +1935,11 @@ ospf_external_lsa_flush (struct ospf *ospf,
ospf_lsa_flush_as (ospf, lsa);
}
+#ifdef HAVE_NSSA
+ /* If there is NSSA area, flush Type-7 lsa's as well */
+ ospf_nssa_lsa_flush (ospf, p);
+#endif /* HAVE_NSSA */
+
if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))
zlog_info ("ospf_external_lsa_flush(): stop");
}
diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h
index 82d9549f..b12feebc 100644
--- a/ospfd/ospf_lsa.h
+++ b/ospfd/ospf_lsa.h
@@ -266,6 +266,7 @@ struct ospf_lsa *ospf_summary_asbr_lsa_refresh (struct ospf *, struct ospf_lsa *
struct ospf_lsa *ospf_lsa_install (struct ospf *,
struct ospf_interface *, struct ospf_lsa *);
+void ospf_nssa_lsa_flush (struct ospf *ospf, struct prefix_ipv4 *p);
void ospf_external_lsa_flush (struct ospf *, u_char, struct prefix_ipv4 *,
unsigned int, struct in_addr);