summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2020-10-20 15:28:13 +0200
committerGitHub <noreply@github.com>2020-10-20 15:28:13 +0200
commit742e0f4428635ec1086f644cf34b668f0e2644d3 (patch)
tree98145c073bc57ea53408130b07298da9ab5525fb
parentMerge pull request #7323 from ton31337/fix/inet_ntoa_to_pFX_master (diff)
parentospfd: flush type 5 when type 7 is removed (diff)
downloadfrr-742e0f4428635ec1086f644cf34b668f0e2644d3.tar.xz
frr-742e0f4428635ec1086f644cf34b668f0e2644d3.zip
Merge pull request #7206 from ckishimo/fix7086
ospfd: flush type 5 when type 7 is removed
-rw-r--r--ospfd/ospf_abr.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 1375917cd..781102beb 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -638,19 +638,23 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa)
}
/* try find existing AS-External LSA for this prefix */
-
old = ospf_external_info_find_lsa(area->ospf, &p);
- if (old) {
- /* Do not continue if type 5 LSA not approved */
- if (!CHECK_FLAG(old->flags, OSPF_LSA_APPROVED)) {
+ if (CHECK_FLAG(lsa->flags, OSPF_LSA_IN_MAXAGE)) {
+ /* if type-7 is removed, remove old translated type-5 lsa */
+ if (old) {
+ UNSET_FLAG(old->flags, OSPF_LSA_APPROVED);
if (IS_DEBUG_OSPF_NSSA)
zlog_debug(
- "ospf_abr_translate_nssa(): LSA Id %s type 5 is not approved",
+ "ospf_abr_translate_nssa(): remove old translated LSA id %s",
inet_ntoa(old->data->id));
- return 1;
}
+ /* if type-7 is removed and type-5 does not exist, do not
+ * originate */
+ return 1;
+ }
+ if (old && CHECK_FLAG(old->flags, OSPF_LSA_APPROVED)) {
if (IS_DEBUG_OSPF_NSSA)
zlog_debug(
"ospf_abr_translate_nssa(): found old translated LSA Id %s, refreshing",