diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-18 09:57:55 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-18 17:45:41 +0100 |
commit | ce4b236f610d427d3bb359798edf04ccab0a3322 (patch) | |
tree | fda9237d2b700219f67a57c95bf62d46f1201a21 /ospf6d/ospf6_top.c | |
parent | ospfd: Replace inet_ntop to %pI4/6 for JSON outputs (diff) | |
download | frr-ce4b236f610d427d3bb359798edf04ccab0a3322.tar.xz frr-ce4b236f610d427d3bb359798edf04ccab0a3322.zip |
ospf6d: Replace inet_ntop to %pI4/6 for JSON outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r-- | ospf6d/ospf6_top.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 7e9ed4160..2739dfb76 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -1482,9 +1482,8 @@ DEFUN(show_ipv6_ospf6_vrfs, show_ipv6_ospf6_vrfs_cmd, if (uj) { json_object_int_add(json_vrf, "vrfId", vrf_id_ui); - json_object_string_add(json_vrf, "routerId", - inet_ntop(AF_INET, &router_id, - buf, sizeof(buf))); + json_object_string_addf(json_vrf, "routerId", "%pI4", + &router_id); json_object_object_add(json_vrfs, name, json_vrf); } else { |