diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index ca6f079401..3c7fb4cb17 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -4807,8 +4807,15 @@ DEFUN(show_bgp_l2vpn_evpn_route, evpn_show_all_routes(vty, bgp, type, json, detail); - if (uj) - vty_json(vty, json); + if (uj) { + if (detail) { + vty_out(vty, "%s\n", json_object_to_json_string(json)); + json_object_free(json); + } else { + vty_json(vty, json); + } + } + return CMD_SUCCESS; }