summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-10-21 19:57:06 +0200
committerMark Stapp <mjs@voltanet.io>2020-10-22 19:37:25 +0200
commit9bcef951be1db4f94eb985c007e4b563657af20e (patch)
treed818389f6d611c47770f002fbada358260cb43e6 /zebra/zebra_mpls.c
parentospfd: replace inet_ntoa (diff)
downloadfrr-9bcef951be1db4f94eb985c007e4b563657af20e.tar.xz
frr-9bcef951be1db4f94eb985c007e4b563657af20e.zip
zebra: replace inet_ntoa
Stop using inet_ntoa - use %pI4 or inet_ntop instead Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index c3982904e..66aea8936 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -1502,7 +1502,8 @@ static json_object *nhlfe_json(zebra_nhlfe_t *nhlfe)
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
json_object_string_add(json_nhlfe, "nexthop",
- inet_ntoa(nexthop->gate.ipv4));
+ inet_ntop(AF_INET, &nexthop->gate.ipv4,
+ buf, sizeof(buf)));
break;
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
@@ -1560,7 +1561,7 @@ static void nhlfe_print(zebra_nhlfe_t *nhlfe, struct vty *vty,
switch (nexthop->type) {
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
- vty_out(vty, " via %s", inet_ntoa(nexthop->gate.ipv4));
+ vty_out(vty, " via %pI4", &nexthop->gate.ipv4);
if (nexthop->ifindex)
vty_out(vty, " dev %s",
ifindex2ifname(nexthop->ifindex,