diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 6c1ac6761a..cfdf892d9a 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -1036,8 +1036,8 @@ void ospf_lsa_flush_area(struct ospf_lsa *lsa, struct ospf_area *area) retransmissions */ lsa->data->ls_age = htons(OSPF_LSA_MAXAGE); if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: MAXAGE set to LSA %pI4", __func__, - &lsa->data->id); + zlog_debug("%s: MaxAge set to LSA[%s]", __func__, + dump_lsa_key(lsa)); monotime(&lsa->tv_recv); lsa->tv_orig = lsa->tv_recv; ospf_flood_through_area(area, NULL, lsa); @@ -1050,6 +1050,9 @@ void ospf_lsa_flush_as(struct ospf *ospf, struct ospf_lsa *lsa) more time for the ACK to be received and avoid retransmissions */ lsa->data->ls_age = htons(OSPF_LSA_MAXAGE); + if (IS_DEBUG_OSPF_EVENT) + zlog_debug("%s: MaxAge set to LSA[%s]", __func__, + dump_lsa_key(lsa)); monotime(&lsa->tv_recv); lsa->tv_orig = lsa->tv_recv; ospf_flood_through_as(ospf, NULL, lsa); diff --git a/ospfd/ospf_gr_helper.c b/ospfd/ospf_gr_helper.c index b32318b832..520702b344 100644 --- a/ospfd/ospf_gr_helper.c +++ b/ospfd/ospf_gr_helper.c @@ -623,9 +623,8 @@ void ospf_helper_handle_topo_chg(struct ospf *ospf, struct ospf_lsa *lsa) return; if (IS_DEBUG_OSPF_GR_HELPER) - zlog_debug( - "%s, Topo change detected due to lsa LSID:%pI4 type:%d", - __func__, &lsa->data->id, lsa->data->type); + zlog_debug("%s: Topo change detected due to LSA[%s]", __func__, + dump_lsa_key(lsa)); lsa->to_be_acknowledged = OSPF_GR_TRUE; diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index c850df55bb..b098581cec 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -2791,8 +2791,8 @@ struct ospf_lsa *ospf_lsa_install(struct ospf *ospf, struct ospf_interface *oi, */ if (IS_LSA_MAXAGE(new)) { if (IS_DEBUG_OSPF(lsa, LSA_INSTALL)) - zlog_debug("LSA[Type%d:%pI4]: Install LSA %p, MaxAge", - new->data->type, &new->data->id, lsa); + zlog_debug("LSA[%s]: Install LSA %p, MaxAge", + dump_lsa_key(new), lsa); ospf_lsa_maxage(ospf, lsa); } @@ -2874,9 +2874,8 @@ static int ospf_maxage_lsa_remover(struct thread *thread) if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) zlog_debug( - "LSA[Type%d:%pI4]: MaxAge LSA removed from list", - lsa->data->type, - &lsa->data->id); + "LSA[%s]: MaxAge LSA removed from list", + dump_lsa_key(lsa)); if (CHECK_FLAG(lsa->flags, OSPF_LSA_PREMATURE_AGE)) { if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) @@ -2894,9 +2893,8 @@ static int ospf_maxage_lsa_remover(struct thread *thread) */ if (old != lsa) { flog_err(EC_OSPF_LSA_MISSING, - "%s: LSA[Type%d:%pI4]: LSA not in LSDB", - __func__, lsa->data->type, - &lsa->data->id); + "%s: LSA[%s]: LSA not in LSDB", + __func__, dump_lsa_key(lsa)); continue; } @@ -2905,9 +2903,8 @@ static int ospf_maxage_lsa_remover(struct thread *thread) } else { if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) zlog_debug( - "%s: LSA[Type%d:%pI4]: No associated LSDB!", - __func__, lsa->data->type, - &lsa->data->id); + "%s: LSA[%s]: No associated LSDB!", + __func__, dump_lsa_key(lsa)); } } @@ -2964,9 +2961,8 @@ void ospf_lsa_maxage(struct ospf *ospf, struct ospf_lsa *lsa) if (CHECK_FLAG(lsa->flags, OSPF_LSA_IN_MAXAGE)) { if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) zlog_debug( - "LSA[Type%d:%pI4]: %p already exists on MaxAge LSA list", - lsa->data->type, &lsa->data->id, - (void *)lsa); + "LSA[%s]: %p already exists on MaxAge LSA list", + dump_lsa_key(lsa), lsa); return; } diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index fac2f97141..9ec2ed0aa8 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -2147,6 +2147,11 @@ void ospf_opaque_self_originated_lsa_received(struct ospf_neighbor *nbr, if ((top = oi_to_top(nbr->oi)) == NULL) return; + if (IS_DEBUG_OSPF_EVENT) + zlog_debug( + "LSA[Type%d:%pI4]: processing self-originated Opaque-LSA", + lsa->data->type, &lsa->data->id); + /* * Since these LSA entries are not yet installed into corresponding * LSDB, just flush them without calling ospf_ls_maxage() afterward. diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 580eee13cf..d9b9f1d22e 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -3575,14 +3575,13 @@ static int ospf_make_ls_upd(struct ospf_interface *oi, struct list *update, struct lsa_header *lsah; uint16_t ls_age; - if (IS_DEBUG_OSPF_EVENT) - zlog_debug("ospf_make_ls_upd: List Iteration %d", - count); - lsa = listgetdata(node); - assert(lsa->data); + if (IS_DEBUG_OSPF_EVENT) + zlog_debug("%s: List Iteration %d LSA[%s]", __func__, + count, dump_lsa_key(lsa)); + /* Will it fit? Minimum it has to fit atleast one */ if ((length + delta + ntohs(lsa->data->length) > size_noauth) && (count > 0))