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>
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");
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);