mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-02-01 15:35:00 +00:00
Merge pull request #5406 from lkrishnamoor/advertise-routes-bug2
bgpd: Blank RD in "sh bgp l2vpn evpn all neighbors ip advertised-routes json"
This commit is contained in:
commit
d813028cf6
@ -85,9 +85,13 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
|
||||
if (table == NULL)
|
||||
continue;
|
||||
|
||||
|
||||
/*
|
||||
* Initialize variables for each RD
|
||||
* All prefixes under an RD is aggregated within "json_routes"
|
||||
*/
|
||||
rd_header = 1;
|
||||
memset(rd_str, 0, sizeof(rd_str));
|
||||
json_routes = NULL;
|
||||
|
||||
for (rm = bgp_table_top(table); rm; rm = bgp_route_next(rm)) {
|
||||
struct bgp_adj_out *adj = NULL;
|
||||
@ -223,7 +227,7 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
|
||||
output_count++;
|
||||
}
|
||||
|
||||
if (use_json)
|
||||
if (use_json && json_routes)
|
||||
json_object_object_add(json_adv, rd_str, json_routes);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user