summaryrefslogtreecommitdiff
path: root/zebra/zebra_evpn_mh.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_evpn_mh.c')
-rw-r--r--zebra/zebra_evpn_mh.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index 3f7e6256fc..df4d48964a 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -1328,9 +1328,7 @@ static void zebra_evpn_es_l2_nh_show_entry(struct zebra_evpn_l2_nh *nh,
char ip_buf[INET6_ADDRSTRLEN];
json = json_object_new_object();
- json_object_string_add(json, "vtep",
- inet_ntop(AF_INET, &nh->vtep_ip, ip_buf,
- sizeof(ip_buf)));
+ json_object_string_addf(json, "vtep", "%pI4", &nh->vtep_ip);
json_object_int_add(json, "nhId", nh->nh_id);
json_object_int_add(json, "refCnt", nh->ref_cnt);
@@ -3012,9 +3010,8 @@ static void zebra_evpn_es_json_vtep_fill(struct zebra_evpn_es *es,
for (ALL_LIST_ELEMENTS_RO(es->es_vtep_list, node, es_vtep)) {
json_vtep_entry = json_object_new_object();
- json_object_string_add(json_vtep_entry, "vtep",
- inet_ntop(AF_INET, &es_vtep->vtep_ip,
- ip_buf, sizeof(ip_buf)));
+ json_object_string_addf(json_vtep_entry, "vtep", "%pI4",
+ &es_vtep->vtep_ip);
if (es_vtep->flags & ZEBRA_EVPNES_VTEP_RXED_ESR) {
json_object_string_add(
json_vtep_entry, "dfAlgorithm",