]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: fix the display topology command
authoranlan_cs <anlan_cs@tom.com>
Tue, 7 May 2024 01:08:05 +0000 (09:08 +0800)
committeranlan_cs <anlan_cs@tom.com>
Tue, 7 May 2024 01:25:02 +0000 (09:25 +0800)
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 <anlan_cs@tom.com>
isisd/isis_spf.c

index 294c03def1db49aec5e2ffad868ab29fc7a993d5..dccff0f3cd450a03d24062309192fbefeef3e82c 100644 (file)
@@ -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