From 47640d5e321eeb102d43d4a9b5b7b992ee37bf1b Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Wed, 22 May 2024 13:34:01 +0200 Subject: [PATCH] isisd: fix show isis segment-routing node algorithm 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 --- isisd/isis_sr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isisd/isis_sr.c b/isisd/isis_sr.c index af22f56f8bb4..f7830380064e 100644 --- a/isisd/isis_sr.c +++ b/isisd/isis_sr.c @@ -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);