diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-10-22 18:39:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-22 18:39:04 -0400 |
| commit | b7f49e15a2fea2cb1676c921a5e68f974f9c3f33 (patch) | |
| tree | 5ce62762bb16b2f2a6d983f860f6b4c4f63e44e8 /zebra/zebra_mpls.c | |
| parent | cc1107bf59ab88f7f19bfefb540d3b5cc63df3f3 (diff) | |
| parent | d0b0a2c545c2960df768e86a0bdb2e78610efc86 (diff) | |
Merge pull request #7358 from mjstapp/fix_ntoa
ospfd, zebra: Replace use of inet_ntoa
Diffstat (limited to 'zebra/zebra_mpls.c')
| -rw-r--r-- | zebra/zebra_mpls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index c3982904e9..66aea8936e 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, |
