]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: fix show isis segment-routing node algorithm 16069/head
authorLouis Scalbert <louis.scalbert@6wind.com>
Wed, 22 May 2024 11:34:01 +0000 (13:34 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Wed, 22 May 2024 11:42:19 +0000 (13:42 +0200)
Fix an issue where "show isis segment-routing node algorithm" displays
"IS-IS X SR-Nodes:" for absent flex-algorithms.

> IS-IS L2 SR-Nodes:
>
> IS-IS L2 SR-Nodes:
> [...]

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
isisd/isis_sr.c

index af22f56f8bb4ab4ed21f1273dd587936a2baec62..f7830380064ed2ceb1f4e9a5220d3641d994e15c 100644 (file)
@@ -1020,8 +1020,6 @@ static void show_node(struct vty *vty, struct isis_area *area, int level,
        struct ttable *tt;
        char buf[128];
 
-       vty_out(vty, " IS-IS %s SR-Nodes:\n\n", circuit_t2string(level));
-
        /* Prepare table. */
        tt = ttable_new(&ttable_styles[TTSTYLE_BLANK]);
        ttable_add_row(tt, "System ID|SRGB|SRLB|Algorithm|MSD");
@@ -1062,6 +1060,8 @@ static void show_node(struct vty *vty, struct isis_area *area, int level,
        if (tt->nrows > 1) {
                char *table;
 
+               vty_out(vty, " IS-IS %s SR-Nodes:\n\n", circuit_t2string(level));
+
                table = ttable_dump(tt, "\n");
                vty_out(vty, "%s\n", table);
                XFREE(MTYPE_TMP, table);