Skip to content

Commit b7e843d

Browse files
committed
bgpd: fix bgp orf prefix-list json prefix
0x<address>FX was displayed instead of the prefix. Fixes: b219dda ("lib: Convert usage of strings to %pFX and %pRN") Signed-off-by: Louis Scalbert <[email protected]>
1 parent 465d286 commit b7e843d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: lib/plist.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -1544,11 +1544,6 @@ int prefix_bgp_show_prefix_list(struct vty *vty, afi_t afi, char *name,
15441544
plist->name);
15451545

15461546
for (pentry = plist->head; pentry; pentry = pentry->next) {
1547-
struct prefix *p = &pentry->prefix;
1548-
char buf_a[BUFSIZ];
1549-
1550-
snprintf(buf_a, sizeof(buf_a), "%pFX", p);
1551-
15521547
json_object_int_add(json_list, "seq", pentry->seq);
15531548
json_object_string_add(json_list, "seqPrefixListType",
15541549
prefix_list_type_str(pentry));
@@ -1560,7 +1555,7 @@ int prefix_bgp_show_prefix_list(struct vty *vty, afi_t afi, char *name,
15601555
json_object_int_add(json_list, "le",
15611556
pentry->le);
15621557

1563-
json_object_object_add(json_prefix, buf_a, json_list);
1558+
json_object_object_addf(json_prefix, json_list, "%pFX", &pentry->prefix);
15641559
}
15651560
if (afi == AFI_IP)
15661561
json_object_object_add(json, "ipPrefixList",

0 commit comments

Comments
 (0)