summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-09-18 14:56:12 -0400
committerGitHub <noreply@github.com>2020-09-18 14:56:12 -0400
commit193ba68dd48374e8bfda4a0a655a9fc015d4aa7c (patch)
treef1ebb567dd3dbf064b77f96e7167db328fde8ad9
parentaef654298471bda911b4bf5444af405f456f3aa8 (diff)
parent919714bd3f6f8ae0a4dc61554a8f24b14ad94be7 (diff)
Merge pull request #7077 from ckishimo/debug
ospfd: fix debug ospf nssa prints wrong info
-rw-r--r--ospfd/ospf_lsa.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 376310e4ff..8095219146 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -1796,7 +1796,15 @@ struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *ospf,
return NULL;
}
- extnew = (struct as_external_lsa *)new;
+ extnew = (struct as_external_lsa *)new->data;
+
+ if ((new = ospf_lsa_install(ospf, NULL, new)) == NULL) {
+ flog_warn(
+ EC_OSPF_LSA_INSTALL_FAILURE,
+ "ospf_lsa_translated_nssa_originate(): Could not install LSA id %s",
+ inet_ntoa(type7->data->id));
+ return NULL;
+ }
if (IS_DEBUG_OSPF_NSSA) {
zlog_debug(
@@ -1807,13 +1815,6 @@ struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *ospf,
inet_ntoa(extnew->e[0].fwd_addr));
}
- if ((new = ospf_lsa_install(ospf, NULL, new)) == NULL) {
- flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
- "ospf_lsa_translated_nssa_originate(): Could not install LSA id %s",
- inet_ntoa(type7->data->id));
- return NULL;
- }
-
ospf->lsa_originate_count++;
ospf_flood_through_as(ospf, NULL, new);