mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
Merge pull request #13334 from louis-6wind/flexalgo-fixes
isisd: fixes for Flex-Algo
This commit is contained in:
commit
4dbef8567b
|
@ -20,6 +20,9 @@ static bool isis_affinity_map_check_use(const char *affmap_name)
|
|||
struct affinity_map *map;
|
||||
uint16_t pos;
|
||||
|
||||
if (!isis)
|
||||
return false;
|
||||
|
||||
map = affinity_map_get(affmap_name);
|
||||
pos = map->bit_position;
|
||||
|
||||
|
@ -46,6 +49,9 @@ static void isis_affinity_map_update(const char *affmap_name, uint16_t old_pos,
|
|||
struct flex_algo *fa;
|
||||
bool changed;
|
||||
|
||||
if (!isis)
|
||||
return;
|
||||
|
||||
for (ALL_LIST_ELEMENTS_RO(isis->area_list, area_node, area)) {
|
||||
changed = false;
|
||||
for (ALL_LIST_ELEMENTS_RO(area->flex_algos->flex_algos, fa_node,
|
||||
|
|
|
@ -243,8 +243,6 @@ bool isis_flex_algo_constraint_drop(struct isis_spftree *spftree,
|
|||
{
|
||||
bool ret;
|
||||
struct isis_ext_subtlvs *subtlvs = reach->subtlvs;
|
||||
uint8_t lspid_orig[ISIS_SYS_ID_LEN + 2];
|
||||
uint8_t lspid_neigh[ISIS_SYS_ID_LEN + 2];
|
||||
struct isis_router_cap_fad *fad;
|
||||
struct isis_asla_subtlvs *asla;
|
||||
struct listnode *node;
|
||||
|
@ -286,15 +284,11 @@ bool isis_flex_algo_constraint_drop(struct isis_spftree *spftree,
|
|||
if (link_admin_group && link_ext_admin_group) {
|
||||
link_ext_admin_group_bitmap0 =
|
||||
admin_group_get_offset(link_ext_admin_group, 0);
|
||||
if (*link_admin_group != link_ext_admin_group_bitmap0) {
|
||||
memcpy(lspid_orig, lsp->hdr.lsp_id,
|
||||
ISIS_SYS_ID_LEN + 2);
|
||||
memcpy(lspid_neigh, reach->id, ISIS_SYS_ID_LEN + 2);
|
||||
if (*link_admin_group != link_ext_admin_group_bitmap0)
|
||||
zlog_warn(
|
||||
"ISIS-SPF: LSP from %pLS neighbor %pLS. Admin-group 0x%08x differs from ext admin-group 0x%08x.",
|
||||
lspid_orig, lspid_neigh, *link_admin_group,
|
||||
"ISIS-SPF: LSP from %pPN neighbor %pPN. Admin-group 0x%08x differs from ext admin-group 0x%08x.",
|
||||
lsp->hdr.lsp_id, reach->id, *link_admin_group,
|
||||
link_ext_admin_group_bitmap0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2884,7 +2884,8 @@ static void show_isis_route_common(struct vty *vty, int levels,
|
|||
spftree = area->spftree[SPFTREE_IPV4]
|
||||
[level - 1];
|
||||
|
||||
isis_print_spftree(vty, spftree);
|
||||
if (!json)
|
||||
isis_print_spftree(vty, spftree);
|
||||
|
||||
isis_print_routes(vty, spftree,
|
||||
json ? &json_val : NULL,
|
||||
|
@ -2905,7 +2906,8 @@ static void show_isis_route_common(struct vty *vty, int levels,
|
|||
spftree = area->spftree[SPFTREE_IPV6]
|
||||
[level - 1];
|
||||
|
||||
isis_print_spftree(vty, spftree);
|
||||
if (!json)
|
||||
isis_print_spftree(vty, spftree);
|
||||
|
||||
isis_print_routes(vty, spftree,
|
||||
json ? &json_val : NULL,
|
||||
|
@ -2927,7 +2929,8 @@ static void show_isis_route_common(struct vty *vty, int levels,
|
|||
spftree = area->spftree[SPFTREE_DSTSRC]
|
||||
[level - 1];
|
||||
|
||||
isis_print_spftree(vty, spftree);
|
||||
if (!json)
|
||||
isis_print_spftree(vty, spftree);
|
||||
isis_print_routes(vty, spftree,
|
||||
json ? &json_val : NULL,
|
||||
prefix_sid, backup);
|
||||
|
|
|
@ -3144,7 +3144,7 @@ static void area_resign_level(struct isis_area *area, int level)
|
|||
for (ALL_LIST_ELEMENTS_RO(area->flex_algos->flex_algos, node,
|
||||
fa)) {
|
||||
data = fa->data;
|
||||
if (data->spftree[level - 1]) {
|
||||
if (data->spftree[tree][level - 1]) {
|
||||
isis_spftree_del(
|
||||
data->spftree[tree][level - 1]);
|
||||
data->spftree[tree][level - 1] = NULL;
|
||||
|
|
Loading…
Reference in a new issue