mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 04:42:58 +00:00
Merge pull request #12967 from pguibert6WIND/show_zebra_mpls_empty
This commit is contained in:
commit
3bde1a53cc
@ -3730,14 +3730,20 @@ void zebra_mpls_print_lsp(struct vty *vty, struct zebra_vrf *zvrf,
|
|||||||
|
|
||||||
/* Lookup table. */
|
/* Lookup table. */
|
||||||
lsp_table = zvrf->lsp_table;
|
lsp_table = zvrf->lsp_table;
|
||||||
if (!lsp_table)
|
if (!lsp_table) {
|
||||||
|
if (use_json)
|
||||||
|
vty_out(vty, "{}\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* If entry is not present, exit. */
|
/* If entry is not present, exit. */
|
||||||
tmp_ile.in_label = label;
|
tmp_ile.in_label = label;
|
||||||
lsp = hash_lookup(lsp_table, &tmp_ile);
|
lsp = hash_lookup(lsp_table, &tmp_ile);
|
||||||
if (!lsp)
|
if (!lsp) {
|
||||||
|
if (use_json)
|
||||||
|
vty_out(vty, "{}\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
json = lsp_json(lsp);
|
json = lsp_json(lsp);
|
||||||
|
Loading…
Reference in New Issue
Block a user