diff options
Diffstat (limited to 'zebra/zebra_evpn_neigh.c')
| -rw-r--r-- | zebra/zebra_evpn_neigh.c | 12 |
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"); |
