Skip to content

Commit

Permalink
isisd: fix mispelling with ISIS_SR_LAN_BACKUP
Browse files Browse the repository at this point in the history
The ISIS_SR_LAN_BACKUP should be renamed to ISIS_SR_ADJ_BACKUP.

Fixes: 26f6aca ("isisd: add support for segment routing")

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Apr 3, 2024
1 parent 27cc9ae commit 4ca6cc5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions isisd/isis_adjacency.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ void isis_adj_print_json(struct isis_adjacency *adj, struct json_object *json,
default:
continue;
}
backup = (sra->type == ISIS_SR_LAN_BACKUP) ? " (backup)"
backup = (sra->type == ISIS_SR_ADJ_BACKUP) ? " (backup)"
: "";

json_object_string_add(adj_sid_json, "nexthop",
Expand Down Expand Up @@ -862,7 +862,7 @@ void isis_adj_print_vty(struct isis_adjacency *adj, struct vty *vty,
default:
continue;
}
backup = (sra->type == ISIS_SR_LAN_BACKUP) ? " (backup)"
backup = (sra->type == ISIS_SR_ADJ_BACKUP) ? " (backup)"
: "";

vty_out(vty, " %s %s%s: %u\n",
Expand Down
5 changes: 2 additions & 3 deletions isisd/isis_lfa.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,8 @@ int isis_tilfa_check(struct isis_spftree *spftree_pc,

adj = isis_adj_find(spftree_pc->area, spftree_pc->level,
vertex->N.id);
if (adj
&& isis_sr_adj_sid_find(adj, spftree_pc->family,
ISIS_SR_LAN_BACKUP)) {
if (adj && isis_sr_adj_sid_find(adj, spftree_pc->family,
ISIS_SR_ADJ_BACKUP)) {
if (IS_DEBUG_LFA)
zlog_debug(
"ISIS-LFA: %s %s already covered by node protection",
Expand Down
7 changes: 3 additions & 4 deletions isisd/isis_sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,7 @@ void isis_area_delete_backup_adj_sids(struct isis_area *area, int level)
struct listnode *node, *nnode;

for (ALL_LIST_ELEMENTS(area->srdb.adj_sids, node, nnode, sra))
if (sra->type == ISIS_SR_LAN_BACKUP
&& (sra->adj->level & level))
if (sra->type == ISIS_SR_ADJ_BACKUP && (sra->adj->level & level))
sr_adj_sid_del(sra);
}

Expand Down Expand Up @@ -689,7 +688,7 @@ void sr_adj_sid_add_single(struct isis_adjacency *adj, int family, bool backup,
circuit->ext = isis_alloc_ext_subtlvs();

sra = XCALLOC(MTYPE_ISIS_SR_INFO, sizeof(*sra));
sra->type = backup ? ISIS_SR_LAN_BACKUP : ISIS_SR_ADJ_NORMAL;
sra->type = backup ? ISIS_SR_ADJ_BACKUP : ISIS_SR_ADJ_NORMAL;
sra->input_label = input_label;
sra->nexthop.family = family;
sra->nexthop.address = nexthop;
Expand Down Expand Up @@ -819,7 +818,7 @@ static void sr_adj_sid_del(struct sr_adjacency *sra)
exit(1);
}

if (sra->type == ISIS_SR_LAN_BACKUP && sra->backup_nexthops) {
if (sra->type == ISIS_SR_ADJ_BACKUP && sra->backup_nexthops) {
sra->backup_nexthops->del =
(void (*)(void *))isis_nexthop_delete;
list_delete(&sra->backup_nexthops);
Expand Down
2 changes: 1 addition & 1 deletion isisd/isis_sr.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct sr_local_block {
/* Segment Routing Adjacency-SID type. */
enum sr_adj_type {
ISIS_SR_ADJ_NORMAL = 0,
ISIS_SR_LAN_BACKUP,
ISIS_SR_ADJ_BACKUP,
};

/* Segment Routing Adjacency. */
Expand Down
2 changes: 1 addition & 1 deletion isisd/isis_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void isis_zebra_send_adjacency_sid(int cmd, const struct sr_adjacency *sra)
znh->labels[0] = MPLS_LABEL_IMPLICIT_NULL;

/* Set backup nexthops. */
if (sra->type == ISIS_SR_LAN_BACKUP) {
if (sra->type == ISIS_SR_ADJ_BACKUP) {
int count;

count = isis_zebra_add_nexthops(isis, sra->backup_nexthops,
Expand Down

0 comments on commit 4ca6cc5

Please sign in to comment.