From: ckishimo Date: Thu, 10 Sep 2020 19:20:44 +0000 (-0700) Subject: ospfd: fix debug ospf nssa prints wrong info X-Git-Tag: frr-7.5~11^2~54 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=cf19d7c6876e1b00cbbc8e7f409b2feb30855065;p=matthieu%2Ffrr.git ospfd: fix debug ospf nssa prints wrong info Signed-off-by: ckishimo --- 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);