mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
zebra: handle "show evpn es-evi" a non-existent VNI
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>
This commit is contained in:
parent
2eef4f20d0
commit
362c8f2d73
@ -417,15 +417,12 @@ 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, "Type: L local, R remote\n");
|
||||||
vty_out(vty, "%-8s %-30s %-4s\n", "VNI", "ESI", "Type");
|
vty_out(vty, "%-8s %-30s %-4s\n", "VNI", "ESI", "Type");
|
||||||
}
|
}
|
||||||
|
zebra_evpn_es_evi_show_one_evpn(zevpn, vty, json_array, detail);
|
||||||
} else {
|
} else {
|
||||||
if (!uj)
|
if (!uj)
|
||||||
vty_out(vty, "VNI %d doesn't exist\n", vni);
|
vty_out(vty, "VNI %d doesn't exist\n", vni);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
zebra_evpn_es_evi_show_one_evpn(zevpn, vty, json_array, detail);
|
|
||||||
|
|
||||||
if (uj) {
|
if (uj) {
|
||||||
vty_out(vty, "%s\n",
|
vty_out(vty, "%s\n",
|
||||||
json_object_to_json_string_ext(
|
json_object_to_json_string_ext(
|
||||||
|
Loading…
Reference in New Issue
Block a user