diff options
author | paul <paul> | 2003-04-13 21:42:11 +0000 |
---|---|---|
committer | paul <paul> | 2003-04-13 21:42:11 +0000 |
commit | 645878f10fad10f3503da9103bc57bbd96785947 (patch) | |
tree | 1dad7dcf36c3bccd34c6cba4e158599cd665c9c4 /ospfd/ospf_lsa.c | |
parent | e05fba43875e86ba2ec6e3970e5ec3aa2d0e040c (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
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 41 |
1 files changed, 41 insertions, 0 deletions
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"); } |