summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-14 19:16:23 +0200
committerDonald Sharp <sharpd@nvidia.com>2020-10-17 19:39:10 +0200
commite0259674e3fb9fea513ae68ace393b43a2c7b1b9 (patch)
tree7a6fcbf3dc2e36b678d9637d4164f4bb09ac7b59 /ripngd
parentlib: Convert usage of strings to %pFX and %pRN (diff)
downloadfrr-e0259674e3fb9fea513ae68ace393b43a2c7b1b9.tar.xz
frr-e0259674e3fb9fea513ae68ace393b43a2c7b1b9.zip
ripngd: Convert to using %pFX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_interface.c10
-rw-r--r--ripngd/ripngd.c51
2 files changed, 23 insertions, 38 deletions
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index 03c93668b..16859c2d2 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -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);
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index c2eb7c6ee..060477010 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -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;
}