]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: fix mispelling with ISIS_SR_LAN_BACKUP 15672/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 3 Apr 2024 13:58:05 +0000 (15:58 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 4 Apr 2024 13:10:47 +0000 (15:10 +0200)
The ISIS_SR_LAN_BACKUP should be renamed to ISIS_SR_ADJ_BACKUP.

Fixes: 26f6acafc369 ("isisd: add support for segment routing")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
isisd/isis_adjacency.c
isisd/isis_lfa.c
isisd/isis_sr.c
isisd/isis_sr.h
isisd/isis_zebra.c

index cba1b91faef12008fb5c1b0f91289c9bd43fd494..7acd3a2b4e565e551f844ffbd1ed0f747982e571 100644 (file)
@@ -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",
@@ -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",
index 6f21f4cea2ccd536422cc1e43c941f05299353ae..4eb57aefb0a04eb37657aa2a5eba7902e0adc0d2 100644 (file)
@@ -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",
index e8354fdf9226f895e8eb813e22b6e8b92429f2aa..af22f56f8bb4ab4ed21f1273dd587936a2baec62 100644 (file)
@@ -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);
 }
 
@@ -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;
@@ -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);
index 437876029997a9979ad2274d4eaf4c9a0dceeb0d..76f776825da5e4aa9f6ce2785f0d32bbaadd940d 100644 (file)
@@ -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. */
index 18a0c49cebc8d201460a5d60514e86239bb9c5c4..2412ec5e84c99553321c5d28d7e94e22a1db49cb 100644 (file)
@@ -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,