Merge pull request #16069 from louis-6wind/fix-show-isis-algo

isisd: fix show isis algorithm
This commit is contained in:
Donatas Abraitis 2024-05-23 13:38:02 +03:00 committed by GitHub
commit 2bd3c6b4ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -2357,10 +2357,12 @@ static void show_isis_topology_common(struct vty *vty, int levels,
fa_data = (struct isis_flex_algo_data *)fa->data;
} else
fa_data = NULL;
#endif /* ifndef FABRICD */
vty_out(vty,
"Area %s:", area->area_tag ? area->area_tag : "null");
#ifndef FABRICD
if (algo != SR_ALGORITHM_SPF)
vty_out(vty, " Algorithm %hhu\n", algo);
else
@ -3123,8 +3125,7 @@ DEFUN(show_isis_route, show_isis_route_cmd,
#ifndef FABRICD
if (argv_find(argv, argc, "algorithm", &idx)) {
if (argv_find(argv, argc, "(128-255)", &idx))
algorithm = (uint8_t)strtoul(argv[idx + 1]->arg, NULL,
10);
algorithm = (uint8_t)strtoul(argv[idx]->arg, NULL, 10);
else
all_algorithm = true;
}

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