mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:50:29 +00:00
zebra: Replace prefix2str for JSON to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
15116b0069
commit
44991dc163
@ -1318,8 +1318,7 @@ static void connected_dump_vty(struct vty *vty, json_object *json,
|
||||
if (json) {
|
||||
json_addr = json_object_new_object();
|
||||
json_object_array_add(json, json_addr);
|
||||
json_object_string_add(json_addr, "address",
|
||||
prefix2str(p, buf, sizeof(buf)));
|
||||
json_object_string_addf(json_addr, "address", "%pFX", p);
|
||||
} else {
|
||||
vty_out(vty, " %s %pFX", prefix_family_str(p), p);
|
||||
}
|
||||
@ -1327,10 +1326,8 @@ static void connected_dump_vty(struct vty *vty, json_object *json,
|
||||
/* If there is destination address, print it. */
|
||||
if (CONNECTED_PEER(connected) && connected->destination) {
|
||||
if (json) {
|
||||
json_object_string_add(
|
||||
json_addr, "peer",
|
||||
prefix2str(connected->destination, buf,
|
||||
sizeof(buf)));
|
||||
json_object_string_addf(json_addr, "peer", "%pFX",
|
||||
connected->destination);
|
||||
} else {
|
||||
vty_out(vty, " peer %pFX", connected->destination);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user