isisd: fix show isis route algorithm crash

Fix crash with "show isis route algorithm X" command.

Fixes: 88e368b4dc ("isisd: make optional algorithm id in 'show isis route'")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
Louis Scalbert 2024-05-22 11:30:24 +02:00
parent 4bd16486e9
commit 4d0e9e2a9f

View File

@ -3123,8 +3123,7 @@ DEFUN(show_isis_route, show_isis_route_cmd,
#ifndef FABRICD #ifndef FABRICD
if (argv_find(argv, argc, "algorithm", &idx)) { if (argv_find(argv, argc, "algorithm", &idx)) {
if (argv_find(argv, argc, "(128-255)", &idx)) if (argv_find(argv, argc, "(128-255)", &idx))
algorithm = (uint8_t)strtoul(argv[idx + 1]->arg, NULL, algorithm = (uint8_t)strtoul(argv[idx]->arg, NULL, 10);
10);
else else
all_algorithm = true; all_algorithm = true;
} }