summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-13 13:07:16 +0100
committerGitHub <noreply@github.com>2023-12-13 13:07:16 +0100
commitfd74eb2e388308b9bd50ccc4236d53baa53a8da2 (patch)
tree4f3be6ea2a1d80f3795bec344af85e680ced2545 /data
parent6b18f0d0bd6d688b84d54aec8f5a46687c7317f6 (diff)
parent5904a4163d004561b8cb51ad76212a841ce85832 (diff)
downloadvyos-1x-fd74eb2e388308b9bd50ccc4236d53baa53a8da2.tar.gz
vyos-1x-fd74eb2e388308b9bd50ccc4236d53baa53a8da2.zip
Merge pull request #2626 from vyos/mergify/bp/sagitta/pr-2606
SRv6: T591: initial implementation to support locator definition (backport #2606)
Diffstat (limited to 'data')
-rw-r--r--data/configd-include.json1
-rw-r--r--data/templates/frr/bgpd.frr.j28
-rw-r--r--data/templates/frr/zebra.segment_routing.frr.j223
3 files changed, 32 insertions, 0 deletions
diff --git a/data/configd-include.json b/data/configd-include.json
index a762a6d4c..92d3863ce 100644
--- a/data/configd-include.json
+++ b/data/configd-include.json
@@ -53,6 +53,7 @@
"protocols_rip.py",
"protocols_ripng.py",
"protocols_rpki.py",
+"protocols_segment_routing.py",
"protocols_static.py",
"protocols_static_multicast.py",
"qos.py",
diff --git a/data/templates/frr/bgpd.frr.j2 b/data/templates/frr/bgpd.frr.j2
index 6f81174ac..641dac44a 100644
--- a/data/templates/frr/bgpd.frr.j2
+++ b/data/templates/frr/bgpd.frr.j2
@@ -588,6 +588,14 @@ bgp route-reflector allow-outbound-policy
{% if parameters.tcp_keepalive.idle is vyos_defined and parameters.tcp_keepalive.interval is vyos_defined and parameters.tcp_keepalive.probes is vyos_defined %}
bgp tcp-keepalive {{ parameters.tcp_keepalive.idle }} {{ parameters.tcp_keepalive.interval }} {{ parameters.tcp_keepalive.probes }}
{% endif %}
+{% if srv6.locator is vyos_defined %}
+ segment-routing srv6
+ locator {{ srv6.locator }}
+ exit
+{% endif %}
+{% if sid.vpn.per_vrf.export is vyos_defined %}
+ sid vpn per-vrf export {{ sid.vpn.per_vrf.export }}
+{% endif %}
{% if timers.keepalive is vyos_defined and timers.holdtime is vyos_defined %}
timers bgp {{ timers.keepalive }} {{ timers.holdtime }}
{% endif %}
diff --git a/data/templates/frr/zebra.segment_routing.frr.j2 b/data/templates/frr/zebra.segment_routing.frr.j2
new file mode 100644
index 000000000..7b12fcdd0
--- /dev/null
+++ b/data/templates/frr/zebra.segment_routing.frr.j2
@@ -0,0 +1,23 @@
+!
+{% if srv6.locator is vyos_defined %}
+segment-routing
+ srv6
+ locators
+{% for locator, locator_config in srv6.locator.items() %}
+ locator {{ locator }}
+{% if locator_config.prefix is vyos_defined %}
+ prefix {{ locator_config.prefix }} block-len {{ locator_config.block_len }} node-len {{ locator_config.node_len }} func-bits {{ locator_config.func_bits }}
+{% endif %}
+{% if locator_config.behavior_usid is vyos_defined %}
+ behavior usid
+{% endif %}
+ exit
+ !
+{% endfor %}
+ exit
+ !
+exit
+!
+exit
+!
+{% endif %}