summaryrefslogtreecommitdiff
path: root/zebra/zebra_evpn_neigh.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-11-18 10:58:23 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-11-18 18:45:41 +0200
commit08edf9c6af87489c06b7fe45f92d2be09e6622bc (patch)
tree5ec31bcd90c8431708e074a992fb2cd5fdcc2767 /zebra/zebra_evpn_neigh.c
parentb0d5264e3ff279414b7adb22f5e0ddf70d2c5773 (diff)
zebra: Replace inet_ntop to %pI4/6 for JSON outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'zebra/zebra_evpn_neigh.c')
-rw-r--r--zebra/zebra_evpn_neigh.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c
index af46ea6d7a..55212f06b3 100644
--- a/zebra/zebra_evpn_neigh.c
+++ b/zebra/zebra_evpn_neigh.c
@@ -1812,10 +1812,8 @@ void zebra_evpn_print_neigh(struct zebra_neigh *n, void *ctxt,
n->mac->es->esi_str);
} else {
if (json)
- json_object_string_add(
- json, "remoteVtep",
- inet_ntop(AF_INET, &n->r_vtep_ip,
- addr_buf, sizeof(addr_buf)));
+ json_object_string_addf(json, "remoteVtep",
+ "%pI4", &n->r_vtep_ip);
else
vty_out(vty, " Remote VTEP: %pI4\n",
&n->r_vtep_ip);
@@ -1974,10 +1972,8 @@ void zebra_evpn_print_neigh_hash(struct hash_bucket *bucket, void *ctxt)
json_object_string_add(json_row, "remoteEs",
n->mac->es->esi_str);
else
- json_object_string_add(
- json_row, "remoteVtep",
- inet_ntop(AF_INET, &n->r_vtep_ip,
- addr_buf, sizeof(addr_buf)));
+ json_object_string_addf(json_row, "remoteVtep",
+ "%pI4", &n->r_vtep_ip);
if (CHECK_FLAG(n->flags, ZEBRA_NEIGH_DEF_GW))
json_object_boolean_true_add(json_row,
"defaultGateway");