summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2019-10-21 18:39:15 +0200
committerOlivier Dugeon <olivier.dugeon@orange.com>2019-10-21 18:44:20 +0200
commit9f62f0435ef66f7d281406364f290ad82097e112 (patch)
tree6b0d3666d04023f62686d8ff403ebc38c5e0c020 /isisd
parentMerge pull request #5108 from donaldsharp/sendbuffer_size_bgp (diff)
downloadfrr-9f62f0435ef66f7d281406364f290ad82097e112.tar.xz
frr-9f62f0435ef66f7d281406364f290ad82097e112.zip
isisd: Correct missing advertisement of TE param.
Traffic Engineering parameters are correctly advertised in LSP when 'mpls-te on' CLI command is present in the startup config file. However, if IS-IS is started without TE enable at startup and 'mpls-te on' command is issued after, TE link parameters are never announced. The patch correct this issue. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_northbound.c41
1 files changed, 10 insertions, 31 deletions
diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c
index 1e21efa7c..97b7ae4f7 100644
--- a/isisd/isis_northbound.c
+++ b/isisd/isis_northbound.c
@@ -1418,29 +1418,12 @@ static int isis_instance_mpls_te_create(enum nb_event event,
area->mta->status = enable;
}
- /*
- * Following code is intended to handle two cases;
- *
- * 1) MPLS-TE was disabled at startup time, but now become enabled.
- * In this case, we must enable MPLS-TE Circuit regarding interface
- * MPLS_TE flag
- * 2) MPLS-TE was once enabled then disabled, and now enabled again.
- */
- for (ALL_LIST_ELEMENTS_RO(area->circuit_list, node, circuit)) {
- if (circuit->ext == NULL)
- continue;
-
- if (!IS_EXT_TE(circuit->ext)
- && HAS_LINK_PARAMS(circuit->interface))
- isis_link_params_update(circuit, circuit->interface);
- else
- continue;
+ /* Update Extended TLVs according to Interface link parameters */
+ for (ALL_LIST_ELEMENTS_RO(area->circuit_list, node, circuit))
+ isis_link_params_update(circuit, circuit->interface);
- /* Reoriginate STD_TE & GMPLS circuits */
- if (circuit->area)
- lsp_regenerate_schedule(circuit->area, circuit->is_type,
- 0);
- }
+ /* Reoriginate STD_TE & GMPLS circuits */
+ lsp_regenerate_schedule(area, area->is_type, 0);
return NB_OK;
}
@@ -1473,13 +1456,11 @@ static int isis_instance_mpls_te_destroy(enum nb_event event,
circuit->ext->status = EXT_LAN_ADJ_SID;
else
circuit->ext->status = 0;
-
- /* Re-originate circuit without STD_TE & GMPLS parameters */
- if (circuit->area)
- lsp_regenerate_schedule(circuit->area, circuit->is_type,
- 0);
}
+ /* Reoriginate STD_TE & GMPLS circuits */
+ lsp_regenerate_schedule(area, area->is_type, 0);
+
zlog_debug("ISIS-TE(%s): Disabled MPLS Traffic Engineering",
area->area_tag);
@@ -1509,8 +1490,7 @@ static int isis_instance_mpls_te_router_address_modify(enum nb_event event,
area->mta->router_id.s_addr = value.s_addr;
/* And re-schedule LSP update */
- if (listcount(area->area_addrs) > 0)
- lsp_regenerate_schedule(area, area->is_type, 0);
+ lsp_regenerate_schedule(area, area->is_type, 0);
return NB_OK;
}
@@ -1532,8 +1512,7 @@ static int isis_instance_mpls_te_router_address_destroy(enum nb_event event,
area->mta->router_id.s_addr = INADDR_ANY;
/* And re-schedule LSP update */
- if (listcount(area->area_addrs) > 0)
- lsp_regenerate_schedule(area, area->is_type, 0);
+ lsp_regenerate_schedule(area, area->is_type, 0);
return NB_OK;
}