]> git.puffer.fish Git - mirror/frr.git/commitdiff
ripd: Convert to using %pFX
authorDonald Sharp <sharpd@nvidia.com>
Wed, 14 Oct 2020 17:16:46 +0000 (13:16 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Sat, 17 Oct 2020 17:39:10 +0000 (13:39 -0400)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ripd/rip_interface.c
ripd/ripd.c

index aab756aee924b49db1033d44f6e3723a61e34f65..7c35781eefca43db8a3841cbf02f5e0987e62518 100644 (file)
@@ -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);
 
index 389a54f22432d0cafd7ff7b4b1617d173dd1a3ce..49caf3f6d87f798527297b9a4d8363cbcf6f6f1c 100644 (file)
@@ -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));