mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 08:50:16 +00:00
isisd: fix non present level display is show isis database detail json
When a level is not present in show isis database detail json, {} is
displayed.
Display nothing for non present level.
Fixes: a2cac12a63
("isisd: Add json to show isis database command.")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
2e670cd779
commit
c3ccc0a53b
@ -2748,6 +2748,8 @@ static void show_isis_database_json(struct json_object *json, const char *sysid_
|
||||
json_object_object_add(area_json,"area",tag_area_json);
|
||||
json_object_object_add(area_json,"levels",arr_json);
|
||||
for (level = 0; level < ISIS_LEVELS; level++) {
|
||||
if (lspdb_count(&area->lspdb[level]) == 0)
|
||||
continue;
|
||||
lsp_json = json_object_new_object();
|
||||
show_isis_database_lspdb_json(lsp_json, area, level,
|
||||
&area->lspdb[level],
|
||||
|
Loading…
Reference in New Issue
Block a user