From: Donald Sharp Date: Wed, 14 Oct 2020 17:16:46 +0000 (-0400) Subject: ripd: Convert to using %pFX X-Git-Tag: base_7.6~391^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f42238f8951f9d4e7092d4aec2df17ec0f303d7d;p=mirror%2Ffrr.git ripd: Convert to using %pFX Signed-off-by: Donald Sharp --- diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index aab756aee9..7c35781eef 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -603,8 +603,7 @@ int rip_interface_address_add(ZAPI_CALLBACK_ARGS) if (p->family == AF_INET) { if (IS_RIP_DEBUG_ZEBRA) - zlog_debug("connected address %s/%d is added", - inet_ntoa(p->u.prefix4), p->prefixlen); + zlog_debug("connected address %pFX is added", p); rip_enable_apply(ifc->ifp); /* Check if this prefix needs to be redistributed */ @@ -653,9 +652,8 @@ int rip_interface_address_delete(ZAPI_CALLBACK_ARGS) p = ifc->address; if (p->family == AF_INET) { if (IS_RIP_DEBUG_ZEBRA) - zlog_debug("connected address %s/%d is deleted", - inet_ntoa(p->u.prefix4), - p->prefixlen); + zlog_debug("connected address %pFX is deleted", + p); hook_call(rip_ifaddr_del, ifc); diff --git a/ripd/ripd.c b/ripd/ripd.c index 389a54f224..49caf3f6d8 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -337,8 +337,7 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p, (struct prefix *)p) == FILTER_DENY) { if (IS_RIP_DEBUG_PACKET) - zlog_debug("%s/%d filtered by distribute %s", - inet_ntoa(p->prefix), p->prefixlen, + zlog_debug("%pFX filtered by distribute %s", p, inout); return -1; } @@ -348,8 +347,7 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p, (struct prefix *)p) == PREFIX_DENY) { if (IS_RIP_DEBUG_PACKET) - zlog_debug("%s/%d filtered by prefix-list %s", - inet_ntoa(p->prefix), p->prefixlen, + zlog_debug("%pFX filtered by prefix-list %s", p, inout); return -1; } @@ -367,9 +365,8 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p, == FILTER_DENY) { if (IS_RIP_DEBUG_PACKET) zlog_debug( - "%s/%d filtered by distribute %s", - inet_ntoa(p->prefix), - p->prefixlen, inout); + "%pFX filtered by distribute %s", + p, inout); return -1; } } @@ -383,9 +380,8 @@ static int rip_filter(int rip_distribute, struct prefix_ipv4 *p, == PREFIX_DENY) { if (IS_RIP_DEBUG_PACKET) zlog_debug( - "%s/%d filtered by prefix-list %s", - inet_ntoa(p->prefix), - p->prefixlen, inout); + "%pFX filtered by prefix-list %s", + p, inout); return -1; } } @@ -1603,8 +1599,7 @@ void rip_redistribute_add(struct rip *rip, int type, int sub_type, (void)rip_ecmp_add(rip, &newinfo); if (IS_RIP_DEBUG_EVENT) { - zlog_debug("Redistribute new prefix %s/%d", - inet_ntoa(p->prefix), p->prefixlen); + zlog_debug("Redistribute new prefix %pFX", p); } rip_event(rip, RIP_TRIGGERED_UPDATE, 0); @@ -1641,9 +1636,8 @@ void rip_redistribute_delete(struct rip *rip, int type, int sub_type, if (IS_RIP_DEBUG_EVENT) zlog_debug( - "Poison %s/%d on the interface %s with an infinity metric [delete]", - inet_ntoa(p->prefix), - p->prefixlen, + "Poison %pFX on the interface %s with an infinity metric [delete]", + p, ifindex2ifname( ifindex, rip->vrf->vrf_id)); @@ -2266,9 +2260,8 @@ void rip_output_process(struct connected *ifc, struct sockaddr_in *to, if (ret == RMAP_DENYMATCH) { if (IS_RIP_DEBUG_PACKET) zlog_debug( - "RIP %s/%d is filtered by route-map out", - inet_ntoa(p->prefix), - p->prefixlen); + "RIP %pFX is filtered by route-map out", + p); continue; } } @@ -2283,9 +2276,8 @@ void rip_output_process(struct connected *ifc, struct sockaddr_in *to, if (ret == RMAP_DENYMATCH) { if (IS_RIP_DEBUG_PACKET) zlog_debug( - "%s/%d is filtered by route-map", - inet_ntoa(p->prefix), - p->prefixlen); + "%pFX is filtered by route-map", + p); continue; } } @@ -2674,9 +2666,8 @@ void rip_redistribute_withdraw(struct rip *rip, int type) (struct prefix_ipv4 *)&rp->p; zlog_debug( - "Poisone %s/%d on the interface %s with an infinity metric [withdraw]", - inet_ntoa(p->prefix), - p->prefixlen, + "Poisone %pFX on the interface %s with an infinity metric [withdraw]", + p, ifindex2ifname( rinfo->nh.ifindex, rip->vrf->vrf_id));