summaryrefslogtreecommitdiffstats
path: root/pimd/pim_ifchannel.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-01-05 19:12:12 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-01-17 14:10:57 +0100
commit8e8be741b59cb339c946efbc0790466db7dae2e1 (patch)
treebf49c41ef1559d441263dabb81fd292e7e5dd0c8 /pimd/pim_ifchannel.c
parentpimd: add PIMADDR_ANY & tackle assignments (diff)
downloadfrr-8e8be741b59cb339c946efbc0790466db7dae2e1.tar.xz
frr-8e8be741b59cb339c946efbc0790466db7dae2e1.zip
pimd: replace pim_inet4_dump with `%pPAs`
Only pim_sgaddr uses are covered by this since regular in_addr is still used for singular addresses, so only a part of pim_inet4_dump calls are gone with this. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_ifchannel.c')
-rw-r--r--pimd/pim_ifchannel.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 8a641a25f..924817772 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -1331,15 +1331,11 @@ void pim_ifchannel_update_could_assert(struct pim_ifchannel *ch)
if (new_couldassert == old_couldassert)
return;
- if (PIM_DEBUG_PIM_EVENTS) {
- char src_str[INET_ADDRSTRLEN];
- char grp_str[INET_ADDRSTRLEN];
- pim_inet4_dump("<src?>", ch->sg.src, src_str, sizeof(src_str));
- pim_inet4_dump("<grp?>", ch->sg.grp, grp_str, sizeof(grp_str));
- zlog_debug("%s: CouldAssert(%s,%s,%s) changed from %d to %d",
- __func__, src_str, grp_str, ch->interface->name,
- old_couldassert, new_couldassert);
- }
+ if (PIM_DEBUG_PIM_EVENTS)
+ zlog_debug("%s: CouldAssert(%pPAs,%pPAs,%s) changed from %d to %d",
+ __func__, &ch->sg.src, &ch->sg.grp,
+ ch->interface->name, old_couldassert,
+ new_couldassert);
if (new_couldassert) {
/* CouldAssert(S,G,I) switched from false to true */
@@ -1373,19 +1369,15 @@ void pim_ifchannel_update_my_assert_metric(struct pim_ifchannel *ch)
return;
if (PIM_DEBUG_PIM_EVENTS) {
- char src_str[INET_ADDRSTRLEN];
- char grp_str[INET_ADDRSTRLEN];
char old_addr_str[INET_ADDRSTRLEN];
char new_addr_str[INET_ADDRSTRLEN];
- pim_inet4_dump("<src?>", ch->sg.src, src_str, sizeof(src_str));
- pim_inet4_dump("<grp?>", ch->sg.grp, grp_str, sizeof(grp_str));
pim_inet4_dump("<old_addr?>", ch->ifassert_my_metric.ip_address,
old_addr_str, sizeof(old_addr_str));
pim_inet4_dump("<new_addr?>", my_metric_new.ip_address,
new_addr_str, sizeof(new_addr_str));
zlog_debug(
- "%s: my_assert_metric(%s,%s,%s) changed from %u,%u,%u,%s to %u,%u,%u,%s",
- __func__, src_str, grp_str, ch->interface->name,
+ "%s: my_assert_metric(%pPAs,%pPAs,%s) changed from %u,%u,%u,%s to %u,%u,%u,%s",
+ __func__, &ch->sg.src, &ch->sg.grp, ch->interface->name,
ch->ifassert_my_metric.rpt_bit_flag,
ch->ifassert_my_metric.metric_preference,
ch->ifassert_my_metric.route_metric, old_addr_str,
@@ -1412,16 +1404,11 @@ void pim_ifchannel_update_assert_tracking_desired(struct pim_ifchannel *ch)
if (new_atd == old_atd)
return;
- if (PIM_DEBUG_PIM_EVENTS) {
- char src_str[INET_ADDRSTRLEN];
- char grp_str[INET_ADDRSTRLEN];
- pim_inet4_dump("<src?>", ch->sg.src, src_str, sizeof(src_str));
- pim_inet4_dump("<grp?>", ch->sg.grp, grp_str, sizeof(grp_str));
+ if (PIM_DEBUG_PIM_EVENTS)
zlog_debug(
- "%s: AssertTrackingDesired(%s,%s,%s) changed from %d to %d",
- __func__, src_str, grp_str, ch->interface->name,
+ "%s: AssertTrackingDesired(%pPAs,%pPAs,%s) changed from %d to %d",
+ __func__, &ch->sg.src, &ch->sg.grp, ch->interface->name,
old_atd, new_atd);
- }
if (new_atd) {
/* AssertTrackingDesired(S,G,I) switched from false to true */