summaryrefslogtreecommitdiffstats
path: root/ripd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-03-10 02:07:20 +0100
committerDonald Sharp <sharpd@nvidia.com>2021-03-10 02:07:20 +0100
commit2e2262fe14ca55a9b44133e4291a53d8beab644a (patch)
tree54dec671abb5dc3af05e55e28626ba5aaf0d2d4a /ripd
parentripngd: Convet to using internal printf modifiers (diff)
downloadfrr-2e2262fe14ca55a9b44133e4291a53d8beab644a.tar.xz
frr-2e2262fe14ca55a9b44133e4291a53d8beab644a.zip
ripd: Convert to using internal printf formatters
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/ripd.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index a276dedec..4a56efb6f 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -698,7 +698,6 @@ static void rip_packet_dump(struct rip_packet *packet, int size,
caddr_t lim;
struct rte *rte;
const char *command_str;
- char pbuf[BUFSIZ], nbuf[BUFSIZ];
uint8_t netmask = 0;
uint8_t *p;
@@ -766,24 +765,18 @@ static void rip_packet_dump(struct rip_packet *packet, int size,
}
} else
zlog_debug(
- " %s/%d -> %s family %d tag %" ROUTE_TAG_PRI
+ " %pI4/%d -> %pI4 family %d tag %" ROUTE_TAG_PRI
" metric %ld",
- inet_ntop(AF_INET, &rte->prefix, pbuf,
- BUFSIZ),
- netmask,
- inet_ntop(AF_INET, &rte->nexthop, nbuf,
- BUFSIZ),
+ &rte->prefix, netmask, &rte->nexthop,
ntohs(rte->family),
(route_tag_t)ntohs(rte->tag),
(unsigned long)ntohl(rte->metric));
} else {
- zlog_debug(
- " %s family %d tag %" ROUTE_TAG_PRI
- " metric %ld",
- inet_ntop(AF_INET, &rte->prefix, pbuf, BUFSIZ),
- ntohs(rte->family),
- (route_tag_t)ntohs(rte->tag),
- (unsigned long)ntohl(rte->metric));
+ zlog_debug(" %pI4 family %d tag %" ROUTE_TAG_PRI
+ " metric %ld",
+ &rte->prefix, ntohs(rte->family),
+ (route_tag_t)ntohs(rte->tag),
+ (unsigned long)ntohl(rte->metric));
}
}
}