From f185005b2f2f17d5bde3cc20c1f6b4799a46c0b2 Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Tue, 7 May 2024 09:08:05 +0800 Subject: [PATCH] isisd: fix the display topology command The unconfigured flexible algorithm should not be displayed. Before: ``` anlan# show isis topology algorithm Area A: Algorithm 128 Area A:Area A:Area A:Area A:Area A:Area A:Area A:Area A:Area A:Area ... ...... anlan# ``` After: ``` anlan# show isis topology algorithm Area A: Algorithm 128 anlan# ``` Signed-off-by: anlan_cs --- isisd/isis_spf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 294c03def1..dccff0f3cd 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -2343,9 +2343,6 @@ static void show_isis_topology_common(struct vty *vty, int levels, return; for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) { - vty_out(vty, - "Area %s:", area->area_tag ? area->area_tag : "null"); - #ifndef FABRICD /* * The shapes of the flex algo spftree 2-dimensional array @@ -2361,6 +2358,9 @@ static void show_isis_topology_common(struct vty *vty, int levels, } else fa_data = NULL; + vty_out(vty, + "Area %s:", area->area_tag ? area->area_tag : "null"); + if (algo != SR_ALGORITHM_SPF) vty_out(vty, " Algorithm %hhu\n", algo); else -- 2.39.5