summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-05-31 15:27:51 +0200
committerRenato Westphal <renato@opensourcerouting.org>2021-07-05 16:43:02 +0200
commite9505bc63a93b8034d135703efeb8c55ac9ee280 (patch)
tree3b7c8b557156a1b1549f4a9e6c922334857dff83 /ospfd
parentMerge pull request #8979 from opensourcerouting/msdp-topotest-speedup (diff)
downloadfrr-e9505bc63a93b8034d135703efeb8c55ac9ee280.tar.xz
frr-e9505bc63a93b8034d135703efeb8c55ac9ee280.zip
ospfd: print extra LSA information in some log messages
Log the LSA advertising router in addition to the LSA type and ID in the places where that information is necessary to uniquely identify the LSA in the LSDB. This is useful, for example, to know exactly which LSA has changed when the router is exiting from the GR helper mode when a topology change was detected. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_flood.c7
-rw-r--r--ospfd/ospf_gr_helper.c5
-rw-r--r--ospfd/ospf_lsa.c24
-rw-r--r--ospfd/ospf_opaque.c5
-rw-r--r--ospfd/ospf_packet.c9
5 files changed, 26 insertions, 24 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c
index 6c1ac6761..cfdf892d9 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 b32318b83..520702b34 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 c850df55b..b098581ce 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 fac2f9714..9ec2ed0aa 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 580eee13c..d9b9f1d22 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))