summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_evpn_vty.c15
-rw-r--r--bgpd/bgp_evpn_vty.h3
-rw-r--r--bgpd/bgp_route.c3
3 files changed, 21 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index c3f648b720..ca6f079401 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -3192,6 +3192,21 @@ static void evpn_show_all_routes(struct vty *vty, struct bgp *bgp, int type,
}
}
+int bgp_evpn_show_all_routes(struct vty *vty, struct bgp *bgp, int type,
+ bool use_json, int detail)
+{
+ json_object *json = NULL;
+
+ if (use_json)
+ json = json_object_new_object();
+
+ evpn_show_all_routes(vty, bgp, type, json, detail);
+
+ if (use_json)
+ vty_json(vty, json);
+ return CMD_SUCCESS;
+}
+
/*
* Display specified VNI (vty handler)
*/
diff --git a/bgpd/bgp_evpn_vty.h b/bgpd/bgp_evpn_vty.h
index 6b17a83b74..8901644d73 100644
--- a/bgpd/bgp_evpn_vty.h
+++ b/bgpd/bgp_evpn_vty.h
@@ -42,4 +42,7 @@ extern int argv_find_and_parse_oly_idx(struct cmd_token **argv, int argc,
extern int bgp_evpn_cli_parse_type(int *type, struct cmd_token **argv,
int argc);
+extern int bgp_evpn_show_all_routes(struct vty *vty, struct bgp *bgp, int type,
+ bool use_json, int detail);
+
#endif /* _QUAGGA_BGP_EVPN_VTY_H */
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index e478abc44a..ac72c3d00a 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -11811,6 +11811,9 @@ static int bgp_show(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
1, NULL, NULL);
}
+ if (safi == SAFI_EVPN)
+ return bgp_evpn_show_all_routes(vty, bgp, type, use_json, 0);
+
return bgp_show_table(vty, bgp, safi, table, type, output_arg, NULL, 1,
NULL, NULL, &json_header_depth, show_flags,
rpki_target_state);