mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 11:44:16 +00:00
bgpd: Skip automatically created BGP instances for show CMDs
When using e.g. `adverise-all-vni`, and/or `import vrf ...`, the VRF instance is created with a default's VRF ASN and tagged as AUTO_VRF. We MUST skip them here also. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
7540364e58
commit
03c086866b
@ -12753,6 +12753,9 @@ static void bgp_show_all_instances_summary_vty(struct vty *vty, afi_t afi,
|
|||||||
vty_out(vty, "{\n");
|
vty_out(vty, "{\n");
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
|
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
|
||||||
|
if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
|
||||||
|
continue;
|
||||||
|
|
||||||
nbr_output = true;
|
nbr_output = true;
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
if (!is_first)
|
if (!is_first)
|
||||||
@ -16138,6 +16141,9 @@ static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
|
|||||||
vty_out(vty, "{\n");
|
vty_out(vty, "{\n");
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
|
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
|
||||||
|
if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
|
||||||
|
continue;
|
||||||
|
|
||||||
nbr_output = true;
|
nbr_output = true;
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
if (!(json = json_object_new_object())) {
|
if (!(json = json_object_new_object())) {
|
||||||
@ -16697,6 +16703,9 @@ static int bgp_show_all_instance_route_leak_vty(struct vty *vty, afi_t afi,
|
|||||||
if (bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT)
|
if (bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT)
|
||||||
vrf_name = bgp->name;
|
vrf_name = bgp->name;
|
||||||
|
|
||||||
|
if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
json_vrf = json_object_new_object();
|
json_vrf = json_object_new_object();
|
||||||
} else {
|
} else {
|
||||||
@ -16787,6 +16796,9 @@ static void bgp_show_all_instances_updgrps_vty(struct vty *vty, afi_t afi,
|
|||||||
struct bgp *bgp;
|
struct bgp *bgp;
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
|
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
|
||||||
|
if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!uj)
|
if (!uj)
|
||||||
vty_out(vty, "\nInstance %s:\n",
|
vty_out(vty, "\nInstance %s:\n",
|
||||||
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
|
(bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
|
||||||
|
Loading…
Reference in New Issue
Block a user