Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isisd: fix change flex-algorithm number from uint32 to uint8 (backport #17250) #17303

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion isisd/isis_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -2011,14 +2011,23 @@ void cli_show_isis_prefix_sid_algorithm(struct vty *vty,
const char *sid_value_type;
const char *sid_value;
bool n_flag_clear;
uint32_t algorithm;
uint8_t algorithm;

<<<<<<< HEAD
prefix = yang_dnode_get_string(dnode, "./prefix");
sid_value_type = yang_dnode_get_string(dnode, "./sid-value-type");
sid_value = yang_dnode_get_string(dnode, "./sid-value");
algorithm = yang_dnode_get_uint32(dnode, "./algo");
lh_behavior = yang_dnode_get_string(dnode, "./last-hop-behavior");
n_flag_clear = yang_dnode_get_bool(dnode, "./n-flag-clear");
=======
prefix = yang_dnode_get_string(dnode, "prefix");
sid_value_type = yang_dnode_get_string(dnode, "sid-value-type");
sid_value = yang_dnode_get_string(dnode, "sid-value");
algorithm = yang_dnode_get_uint8(dnode, "algo");
lh_behavior = yang_dnode_get_string(dnode, "last-hop-behavior");
n_flag_clear = yang_dnode_get_bool(dnode, "n-flag-clear");
>>>>>>> 8e861a75e8 (isisd: fix change flex-algorithm number from uint32 to uint8)

vty_out(vty, " segment-routing prefix %s", prefix);
vty_out(vty, " algorithm %u", algorithm);
Expand Down
7 changes: 6 additions & 1 deletion isisd/isis_nb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2630,14 +2630,19 @@ int isis_instance_segment_routing_algorithm_prefix_sid_create(
struct isis_area *area;
struct prefix prefix;
struct sr_prefix_cfg *pcfg;
uint32_t algorithm;
uint8_t algorithm;

if (args->event != NB_EV_APPLY)
return NB_OK;

area = nb_running_get_entry(args->dnode, NULL, true);
<<<<<<< HEAD
yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
algorithm = yang_dnode_get_uint32(args->dnode, "./algo");
=======
yang_dnode_get_prefix(&prefix, args->dnode, "prefix");
algorithm = yang_dnode_get_uint8(args->dnode, "algo");
>>>>>>> 8e861a75e8 (isisd: fix change flex-algorithm number from uint32 to uint8)

pcfg = isis_sr_cfg_prefix_add(area, &prefix, algorithm);
pcfg->algorithm = algorithm;
Expand Down
2 changes: 1 addition & 1 deletion yang/frr-isisd.yang
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ module frr-isisd {
if set to disable, ISISEXPLICITNULLFlag
will override the value of ISISPHPFlag";
leaf algo {
type uint32 {
type uint8 {
range "128..255";
}
description
Expand Down
Loading