summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_route.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 689e7a7fa3..8569cbc102 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -13821,7 +13821,11 @@ static int peer_adj_routes(struct vty *vty, struct peer *peer, afi_t afi,
&output_count, &filtered_count);
if (use_json) {
- json_object_object_add(json, "advertisedRoutes", json_ar);
+ if (type == bgp_show_adj_route_advertised)
+ json_object_object_add(json, "advertisedRoutes",
+ json_ar);
+ else
+ json_object_object_add(json, "receivedRoutes", json_ar);
json_object_int_add(json, "totalPrefixCounter", output_count);
json_object_int_add(json, "filteredPrefixCounter",
filtered_count);