diff options
Diffstat (limited to 'ospfd/ospf_bfd.c')
| -rw-r--r-- | ospfd/ospf_bfd.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index d2c5090f2f..4640720952 100644 --- a/ospfd/ospf_bfd.c +++ b/ospfd/ospf_bfd.c @@ -76,9 +76,9 @@ static void ospf_bfd_reg_dereg_nbr(struct ospf_neighbor *nbr, int command) bfd_info = (struct bfd_info *)params->bfd_info; if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE)) - zlog_debug("%s nbr (%s) with BFD. OSPF vrf %s", + zlog_debug("%s nbr (%pI4) with BFD. OSPF vrf %s", bfd_get_command_dbg_str(command), - inet_ntoa(nbr->src), + &nbr->src, ospf_vrf_id_to_name(oi->ospf->vrf_id)); cbit = CHECK_FLAG(bfd_info->flags, BFD_FLAG_BFD_CBIT_ON); @@ -180,8 +180,8 @@ static int ospf_bfd_nbr_replay(ZAPI_CALLBACK_ARGS) continue; if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE)) - zlog_debug("Replaying nbr (%s) to BFD", - inet_ntoa(nbr->src)); + zlog_debug("Replaying nbr (%pI4) to BFD", + &nbr->src); ospf_bfd_reg_dereg_nbr(nbr, ZEBRA_BFD_DEST_UPDATE); @@ -217,12 +217,9 @@ static int ospf_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS) if ((ifp == NULL) || (p.family != AF_INET)) return 0; - if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE)) { - char buf[PREFIX2STR_BUFFER]; - prefix2str(&p, buf, sizeof(buf)); - zlog_debug("Zebra: interface %s bfd destination %s %s", - ifp->name, buf, bfd_get_status_str(status)); - } + if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE)) + zlog_debug("Zebra: interface %s bfd destination %pFX %s", + ifp->name, &p, bfd_get_status_str(status)); params = IF_DEF_PARAMS(ifp); if (!params->bfd_info) @@ -269,18 +266,18 @@ static int ospf_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS) if ((status == BFD_STATUS_DOWN) && (old_status == BFD_STATUS_UP)) { if (IS_DEBUG_OSPF(nsm, NSM_EVENTS)) - zlog_debug("NSM[%s:%s]: BFD Down", + zlog_debug("NSM[%s:%pI4]: BFD Down", IF_NAME(nbr->oi), - inet_ntoa(nbr->address.u.prefix4)); + &nbr->address.u.prefix4); OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_InactivityTimer); } if ((status == BFD_STATUS_UP) && (old_status == BFD_STATUS_DOWN)) { if (IS_DEBUG_OSPF(nsm, NSM_EVENTS)) - zlog_debug("NSM[%s:%s]: BFD Up", + zlog_debug("NSM[%s:%pI4]: BFD Up", IF_NAME(nbr->oi), - inet_ntoa(nbr->address.u.prefix4)); + &nbr->address.u.prefix4); } } |
