]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripngd: Convert to using %pFX
authorDonald Sharp <sharpd@nvidia.com>
Wed, 14 Oct 2020 17:16:23 +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>
ripngd/ripng_interface.c
ripngd/ripngd.c

index 03c93668b9df67aa99357fc0b8f262f43057fc9c..16859c2d29dcf80a0b9176e9634a9d7eca46c37e 100644 (file)
@@ -375,8 +375,7 @@ int ripng_interface_address_add(ZAPI_CALLBACK_ARGS)
                struct ripng_interface *ri = c->ifp->info;
 
                if (IS_RIPNG_DEBUG_ZEBRA)
-                       zlog_debug("RIPng connected address %s/%d add",
-                                  inet6_ntoa(p->u.prefix6), p->prefixlen);
+                       zlog_debug("RIPng connected address %pFX add", p);
 
                /* Check is this prefix needs to be redistributed. */
                ripng_apply_address_add(c);
@@ -428,7 +427,6 @@ int ripng_interface_address_delete(ZAPI_CALLBACK_ARGS)
 {
        struct connected *ifc;
        struct prefix *p;
-       char buf[INET6_ADDRSTRLEN];
 
        ifc = zebra_interface_address_read(ZEBRA_INTERFACE_ADDRESS_DELETE,
                                           zclient->ibuf, vrf_id);
@@ -439,10 +437,8 @@ int ripng_interface_address_delete(ZAPI_CALLBACK_ARGS)
                if (p->family == AF_INET6) {
                        if (IS_RIPNG_DEBUG_ZEBRA)
                                zlog_debug(
-                                       "RIPng connected address %s/%d delete",
-                                       inet_ntop(AF_INET6, &p->u.prefix6, buf,
-                                                 INET6_ADDRSTRLEN),
-                                       p->prefixlen);
+                                       "RIPng connected address %pFX delete",
+                                       p);
 
                        /* Check wether this prefix needs to be removed. */
                        ripng_apply_address_del(ifc);
index c2eb7c6ee4535ff05bd66e14180c64c1370e4d0e..060477010b0a0ec8c89898dedb192a073a991409 100644 (file)
@@ -643,8 +643,7 @@ static int ripng_filter(int ripng_distribute, struct prefix_ipv6 *p,
                                      (struct prefix *)p)
                    == FILTER_DENY) {
                        if (IS_RIPNG_DEBUG_PACKET)
-                               zlog_debug("%s/%d filtered by distribute %s",
-                                          inet6_ntoa(p->prefix), p->prefixlen,
+                               zlog_debug("%pFX filtered by distribute %s", p,
                                           inout);
                        return -1;
                }
@@ -654,8 +653,7 @@ static int ripng_filter(int ripng_distribute, struct prefix_ipv6 *p,
                                      (struct prefix *)p)
                    == PREFIX_DENY) {
                        if (IS_RIPNG_DEBUG_PACKET)
-                               zlog_debug("%s/%d filtered by prefix-list %s",
-                                          inet6_ntoa(p->prefix), p->prefixlen,
+                               zlog_debug("%pFX filtered by prefix-list %s", p,
                                           inout);
                        return -1;
                }
@@ -673,9 +671,8 @@ static int ripng_filter(int ripng_distribute, struct prefix_ipv6 *p,
                                    == FILTER_DENY) {
                                        if (IS_RIPNG_DEBUG_PACKET)
                                                zlog_debug(
-                                                       "%s/%d filtered by distribute %s",
-                                                       inet6_ntoa(p->prefix),
-                                                       p->prefixlen, inout);
+                                                       "%pFX filtered by distribute %s",
+                                                       p, inout);
                                        return -1;
                                }
                        }
@@ -689,9 +686,8 @@ static int ripng_filter(int ripng_distribute, struct prefix_ipv6 *p,
                                    == PREFIX_DENY) {
                                        if (IS_RIPNG_DEBUG_PACKET)
                                                zlog_debug(
-                                                       "%s/%d filtered by prefix-list %s",
-                                                       inet6_ntoa(p->prefix),
-                                                       p->prefixlen, inout);
+                                                       "%pFX filtered by prefix-list %s",
+                                                       p, inout);
                                        return -1;
                                }
                        }
@@ -997,14 +993,12 @@ void ripng_redistribute_add(struct ripng *ripng, int type, int sub_type,
        if (IS_RIPNG_DEBUG_EVENT) {
                if (!nexthop)
                        zlog_debug(
-                               "Redistribute new prefix %s/%d on the interface %s",
-                               inet6_ntoa(p->prefix), p->prefixlen,
-                               ifindex2ifname(ifindex, ripng->vrf->vrf_id));
+                               "Redistribute new prefix %pFX on the interface %s",
+                               p, ifindex2ifname(ifindex, ripng->vrf->vrf_id));
                else
                        zlog_debug(
-                               "Redistribute new prefix %s/%d with nexthop %s on the interface %s",
-                               inet6_ntoa(p->prefix), p->prefixlen,
-                               inet6_ntoa(*nexthop),
+                               "Redistribute new prefix %pFX with nexthop %s on the interface %s",
+                               p, inet6_ntoa(*nexthop),
                                ifindex2ifname(ifindex, ripng->vrf->vrf_id));
        }
 
@@ -1047,9 +1041,8 @@ void ripng_redistribute_delete(struct ripng *ripng, int type, int sub_type,
 
                                if (IS_RIPNG_DEBUG_EVENT)
                                        zlog_debug(
-                                               "Poisone %s/%d on the interface %s with an infinity metric [delete]",
-                                               inet6_ntoa(p->prefix),
-                                               p->prefixlen,
+                                               "Poisone %pFX on the interface %s with an infinity metric [delete]",
+                                               p,
                                                ifindex2ifname(
                                                        ifindex,
                                                        ripng->vrf->vrf_id));
@@ -1091,9 +1084,8 @@ void ripng_redistribute_withdraw(struct ripng *ripng, int type)
                                                        agg_node_get_prefix(rp);
 
                                        zlog_debug(
-                                               "Poisone %s/%d on the interface %s [withdraw]",
-                                               inet6_ntoa(p->prefix),
-                                               p->prefixlen,
+                                               "Poisone %pFX on the interface %s [withdraw]",
+                                               p,
                                                ifindex2ifname(
                                                        rinfo->ifindex,
                                                        ripng->vrf->vrf_id));
@@ -1680,9 +1672,8 @@ void ripng_output_process(struct interface *ifp, struct sockaddr_in6 *to,
                                if (ret == RMAP_DENYMATCH) {
                                        if (IS_RIPNG_DEBUG_PACKET)
                                                zlog_debug(
-                                                       "RIPng %s/%d is filtered by route-map out",
-                                                       inet6_ntoa(p->prefix),
-                                                       p->prefixlen);
+                                                       "RIPng %pFX is filtered by route-map out",
+                                                       p);
                                        continue;
                                }
                        }
@@ -1697,9 +1688,8 @@ void ripng_output_process(struct interface *ifp, struct sockaddr_in6 *to,
                                if (ret == RMAP_DENYMATCH) {
                                        if (IS_RIPNG_DEBUG_PACKET)
                                                zlog_debug(
-                                                       "RIPng %s/%d is filtered by route-map",
-                                                       inet6_ntoa(p->prefix),
-                                                       p->prefixlen);
+                                                       "RIPng %pFX is filtered by route-map",
+                                                       p);
                                        continue;
                                }
                        }
@@ -1795,9 +1785,8 @@ void ripng_output_process(struct interface *ifp, struct sockaddr_in6 *to,
                                if (ret == RMAP_DENYMATCH) {
                                        if (IS_RIPNG_DEBUG_PACKET)
                                                zlog_debug(
-                                                       "RIPng %s/%d is filtered by route-map out",
-                                                       inet6_ntoa(p->prefix),
-                                                       p->prefixlen);
+                                                       "RIPng %pFX is filtered by route-map out",
+                                                       p);
                                        continue;
                                }