]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: handle "show evpn es-evi" a non-existent VNI 9009/head
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Tue, 23 Jun 2020 00:01:06 +0000 (17:01 -0700)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 8 Jul 2021 17:37:11 +0000 (20:37 +0300)
zebra was crashing when the command was run on a non-existent VNI.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215
VNI 16777215 doesn't exist
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215 detail
VNI 16777215 doesn't exist
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215 json
[
]
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215 detail json
[
]
root@torm-12:mgmt:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: CM-30232

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
zebra/zebra_evpn_mh.c

index dc8a4145c53623bd052987e544e10f486e27fe1b..2206ce08327b18cecf48aa1f7810308b42bfd0f0 100644 (file)
@@ -355,11 +355,11 @@ void zebra_evpn_es_evi_show_vni(struct vty *vty, bool uj, vni_t vni, int detail)
                        vty_out(vty, "Type: L local, R remote\n");
                        vty_out(vty, "%-8s %-30s %-4s\n", "VNI", "ESI", "Type");
                }
+               zebra_evpn_es_evi_show_one_evpn(zevpn, vty, json, detail);
        } else {
                if (!uj)
                        vty_out(vty, "VNI %d doesn't exist\n", vni);
        }
-       zebra_evpn_es_evi_show_one_evpn(zevpn, vty, json, detail);
 }
 
 /* Initialize the ES tables maintained per-L2_VNI */