summaryrefslogtreecommitdiffstats
path: root/isisd/isis_nb_config.c
diff options
context:
space:
mode:
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2022-11-28 11:31:58 +0100
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2023-08-04 09:29:16 +0200
commite2e42102677710ed042ba4e47e4c8a96b5ce79a2 (patch)
tree3241469236aac5aea1eeea8925348865f5c6be57 /isisd/isis_nb_config.c
parentisisd: Init SRv6 enabled flag to its default value (diff)
downloadfrr-e2e42102677710ed042ba4e47e4c8a96b5ce79a2.tar.xz
frr-e2e42102677710ed042ba4e47e4c8a96b5ce79a2.zip
isisd: Add nb command to enable/disable SRv6
Add a northbound command to enable/disable SRv6 on a given IS-IS area. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'isisd/isis_nb_config.c')
-rw-r--r--isisd/isis_nb_config.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c
index a3d8896e4..3a56c78de 100644
--- a/isisd/isis_nb_config.c
+++ b/isisd/isis_nb_config.c
@@ -3447,6 +3447,37 @@ int isis_instance_flex_algo_priority_destroy(struct nb_cb_destroy_args *args)
}
/*
+ * XPath: /frr-isisd:isis/instance/segment-routing-srv6/enabled
+ */
+int isis_instance_segment_routing_srv6_enabled_modify(
+ struct nb_cb_modify_args *args)
+{
+ struct isis_area *area;
+
+ if (args->event != NB_EV_APPLY)
+ return NB_OK;
+
+ area = nb_running_get_entry(args->dnode, NULL, true);
+ area->srv6db.config.enabled = yang_dnode_get_bool(args->dnode, NULL);
+
+ if (area->srv6db.config.enabled) {
+ if (IS_DEBUG_EVENTS)
+ zlog_debug(
+ "Segment Routing over IPv6 (SRv6): OFF -> ON");
+ } else {
+ if (IS_DEBUG_EVENTS)
+ zlog_debug(
+ "Segment Routing over IPv6 (SRv6): ON -> OFF");
+ }
+
+ /* Regenerate LSPs to advertise SRv6 capabilities or signal that the
+ * node is no longer SRv6-capable. */
+ lsp_regenerate_schedule(area, area->is_type, 0);
+
+ return NB_OK;
+}
+
+/*
* XPath: /frr-isisd:isis/instance/mpls/ldp-sync
*/
int isis_instance_mpls_ldp_sync_create(struct nb_cb_create_args *args)