]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_route.c
bgpd: Fix the json output of show bgp all json to be in a valid format
[mirror_frr.git] / bgpd / bgp_route.c
index eb51bc1fd672333a5ecb3dbb63205af66645e690..85f08bbed5b5b7369e893a943aaf06368db1ccff 100644 (file)
@@ -13068,6 +13068,15 @@ DEFPY(show_ip_bgp, show_ip_bgp_cmd,
                                                        get_afi_safi_str(afi,
                                                                         safi,
                                                                         true));
+
+                                               /* Adding 'routes' key to make
+                                                * the json output format valid
+                                                * for evpn
+                                                */
+                                               if (safi == SAFI_EVPN)
+                                                       vty_out(vty,
+                                                               "\"routes\":");
+
                                        } else
                                                vty_out(vty,
                                                        "\nFor address family: %s\n",