diff options
author | Mark Stapp <mjs@voltanet.io> | 2020-10-21 19:56:26 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-10-22 19:37:25 +0200 |
commit | 96b663a381c2e90fa663d69fce4e40f0be698e58 (patch) | |
tree | 061e8297387581dcb5e730f405bf9a5596a58dc1 /ospfd/ospf_nsm.c | |
parent | Merge pull request #7343 from ton31337/fix/prefix2str_to_pFX (diff) | |
download | frr-96b663a381c2e90fa663d69fce4e40f0be698e58.tar.xz frr-96b663a381c2e90fa663d69fce4e40f0be698e58.zip |
ospfd: replace inet_ntoa
Stop using inet_ntoa, use %pI4 etc or inet_ntop instead
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r-- | ospfd/ospf_nsm.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 293183182..26e7855e8 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -66,8 +66,8 @@ static int ospf_inactivity_timer(struct thread *thread) nbr->t_inactivity = NULL; if (IS_DEBUG_OSPF(nsm, NSM_TIMERS)) - zlog_debug("NSM[%s:%s:%s]: Timer (Inactivity timer expire)", - IF_NAME(nbr->oi), inet_ntoa(nbr->router_id), + zlog_debug("NSM[%s:%pI4:%s]: Timer (Inactivity timer expire)", + IF_NAME(nbr->oi), &nbr->router_id, ospf_get_name(nbr->oi->ospf)); /* Dont trigger NSM_InactivityTimer event , if the current @@ -91,8 +91,8 @@ static int ospf_db_desc_timer(struct thread *thread) nbr->t_db_desc = NULL; if (IS_DEBUG_OSPF(nsm, NSM_TIMERS)) - zlog_debug("NSM[%s:%s:%s]: Timer (DD Retransmit timer expire)", - IF_NAME(nbr->oi), inet_ntoa(nbr->src), + zlog_debug("NSM[%s:%pI4:%s]: Timer (DD Retransmit timer expire)", + IF_NAME(nbr->oi), &nbr->src, ospf_get_name(nbr->oi->ospf)); /* resent last send DD packet. */ @@ -398,9 +398,9 @@ static int nsm_kill_nbr(struct ospf_neighbor *nbr) if (IS_DEBUG_OSPF(nsm, NSM_EVENTS)) zlog_debug( - "NSM[%s:%s:%s]: Down (PollIntervalTimer scheduled)", + "NSM[%s:%pI4:%s]: Down (PollIntervalTimer scheduled)", IF_NAME(nbr->oi), - inet_ntoa(nbr->address.u.prefix4), + &nbr->address.u.prefix4, ospf_get_name(nbr->oi->ospf)); } @@ -597,8 +597,8 @@ static void nsm_notice_state_change(struct ospf_neighbor *nbr, int next_state, { /* Logging change of status. */ if (IS_DEBUG_OSPF(nsm, NSM_STATUS)) - zlog_debug("NSM[%s:%s:%s]: State change %s -> %s (%s)", - IF_NAME(nbr->oi), inet_ntoa(nbr->router_id), + zlog_debug("NSM[%s:%pI4:%s]: State change %s -> %s (%s)", + IF_NAME(nbr->oi), &nbr->router_id, ospf_get_name(nbr->oi->ospf), lookup_msg(ospf_nsm_state_msg, nbr->state, NULL), lookup_msg(ospf_nsm_state_msg, next_state, NULL), @@ -608,8 +608,8 @@ static void nsm_notice_state_change(struct ospf_neighbor *nbr, int next_state, if (CHECK_FLAG(nbr->oi->ospf->config, OSPF_LOG_ADJACENCY_CHANGES) && (CHECK_FLAG(nbr->oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL) || (next_state == NSM_Full) || (next_state < nbr->state))) - zlog_notice("AdjChg: Nbr %s(%s) on %s: %s -> %s (%s)", - inet_ntoa(nbr->router_id), + zlog_notice("AdjChg: Nbr %pI4(%s) on %s: %s -> %s (%s)", + &nbr->router_id, ospf_get_name(nbr->oi->ospf), IF_NAME(nbr->oi), lookup_msg(ospf_nsm_state_msg, nbr->state, NULL), lookup_msg(ospf_nsm_state_msg, next_state, NULL), @@ -691,8 +691,8 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state) if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)) zlog_info( - "%s:[%s:%s], %s -> %s): scheduling new router-LSA origination", - __func__, inet_ntoa(nbr->router_id), + "%s:[%pI4:%s], %s -> %s): scheduling new router-LSA origination", + __func__, &nbr->router_id, ospf_get_name(oi->ospf), lookup_msg(ospf_nsm_state_msg, old_state, NULL), lookup_msg(ospf_nsm_state_msg, state, NULL)); @@ -749,10 +749,10 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state) OSPF_DD_FLAG_I | OSPF_DD_FLAG_M | OSPF_DD_FLAG_MS; if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)) zlog_info( - "%s: Initializing [DD]: %s with seqnum:%x , flags:%x", + "%s: Initializing [DD]: %pI4 with seqnum:%x , flags:%x", (oi->ospf->name) ? oi->ospf->name : VRF_DEFAULT_NAME, - inet_ntoa(nbr->router_id), nbr->dd_seqnum, + &nbr->router_id, nbr->dd_seqnum, nbr->dd_flags); ospf_db_desc_send(nbr); } @@ -777,8 +777,8 @@ int ospf_nsm_event(struct thread *thread) event = THREAD_VAL(thread); if (IS_DEBUG_OSPF(nsm, NSM_EVENTS)) - zlog_debug("NSM[%s:%s:%s]: %s (%s)", IF_NAME(nbr->oi), - inet_ntoa(nbr->router_id), + zlog_debug("NSM[%s:%pI4:%s]: %s (%s)", IF_NAME(nbr->oi), + &nbr->router_id, ospf_get_name(nbr->oi->ospf), lookup_msg(ospf_nsm_state_msg, nbr->state, NULL), ospf_nsm_event_str[event]); @@ -802,8 +802,8 @@ int ospf_nsm_event(struct thread *thread) */ flog_err( EC_OSPF_FSM_INVALID_STATE, - "NSM[%s:%s:%s]: %s (%s): Warning: action tried to change next_state to %s", - IF_NAME(nbr->oi), inet_ntoa(nbr->router_id), + "NSM[%s:%pI4:%s]: %s (%s): Warning: action tried to change next_state to %s", + IF_NAME(nbr->oi), &nbr->router_id, ospf_get_name(nbr->oi->ospf), lookup_msg(ospf_nsm_state_msg, nbr->state, NULL), |