summaryrefslogtreecommitdiff
path: root/ripd/rip_interface.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-10-22 14:16:33 -0400
committerMark Stapp <mjs@voltanet.io>2020-10-22 16:25:41 -0400
commit53bb7f9bb3a16a7e178f047620f3bcd0ec7b6934 (patch)
tree2730990b1a13075add547c19c5f443568e1b5c84 /ripd/rip_interface.c
parent84de5a245a3eb17619588a535b9f408ce802a8c9 (diff)
ripd: replace inet_ntoa
Replace all uses of inet_ntoa, using pI4, pFX, or inet_pton. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ripd/rip_interface.c')
-rw-r--r--ripd/rip_interface.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 7c35781eef..c2cee4d69d 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -172,8 +172,8 @@ static void rip_request_interface_send(struct interface *ifp, uint8_t version)
continue;
if (IS_RIP_DEBUG_EVENT)
- zlog_debug("SEND request to %s",
- inet_ntoa(to.sin_addr));
+ zlog_debug("SEND request to %pI4",
+ &to.sin_addr);
rip_request_send(&to, ifp, version, connected);
}
@@ -1174,9 +1174,7 @@ int rip_show_network_config(struct vty *vty, struct rip *rip)
for (node = route_top(rip->enable_network); node;
node = route_next(node))
if (node->info)
- vty_out(vty, " %s/%u\n",
- inet_ntoa(node->p.u.prefix4),
- node->p.prefixlen);
+ vty_out(vty, " %pFX\n", &node->p);
/* Interface name RIP enable statement. */
for (i = 0; i < vector_active(rip->enable_interface); i++)
@@ -1186,7 +1184,7 @@ int rip_show_network_config(struct vty *vty, struct rip *rip)
/* RIP neighbors listing. */
for (node = route_top(rip->neighbor); node; node = route_next(node))
if (node->info)
- vty_out(vty, " %s\n", inet_ntoa(node->p.u.prefix4));
+ vty_out(vty, " %pI4\n", &node->p.u.prefix4);
return 0;
}