From 60200fdd9bcd4c8f8ed052047e55ea0baf1bb882 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 25 Nov 2021 17:29:18 +0200 Subject: pbrd: Replace prefix2str for JSON to %pFX Signed-off-by: Donatas Abraitis --- pbrd/pbr_vty.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'pbrd') diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index dddca1d72..005e58ef3 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -953,13 +953,9 @@ static void vty_json_pbrms(json_object *j, struct vty *vty, json_object_string_add(jpbrm, "vrfName", pbrms->vrf_name); if (pbrms->src) - json_object_string_add( - jpbrm, "matchSrc", - prefix2str(pbrms->src, buf, sizeof(buf))); + json_object_string_addf(jpbrm, "matchSrc", "%pFX", pbrms->src); if (pbrms->dst) - json_object_string_add( - jpbrm, "matchDst", - prefix2str(pbrms->dst, buf, sizeof(buf))); + json_object_string_addf(jpbrm, "matchDst", "%pFX", pbrms->dst); if (pbrms->mark) json_object_int_add(jpbrm, "matchMark", pbrms->mark); if (pbrms->dsfield & PBR_DSFIELD_DSCP) -- cgit v1.2.3