summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-04-26 07:04:49 +0200
committerChristian Breunig <christian@breunig.cc>2023-04-26 18:59:07 +0200
commit71e45dd1c4738b3aa72d2d10b73929bf9b14e41e (patch)
tree893c9b390927d17eaefe1a154e5175d989c6a5c1 /data
parent930f76cf88a4175d485bc4e2df4c149ea547b380 (diff)
downloadvyos-1x-71e45dd1c4738b3aa72d2d10b73929bf9b14e41e.tar.gz
vyos-1x-71e45dd1c4738b3aa72d2d10b73929bf9b14e41e.zip
vrf: T5174: ensure no duplicate VNIs can be defined
Diffstat (limited to 'data')
-rw-r--r--data/templates/frr/zebra.vrf.route-map.frr.j26
1 files changed, 5 insertions, 1 deletions
diff --git a/data/templates/frr/zebra.vrf.route-map.frr.j2 b/data/templates/frr/zebra.vrf.route-map.frr.j2
index 3c5791c4c..4e1206374 100644
--- a/data/templates/frr/zebra.vrf.route-map.frr.j2
+++ b/data/templates/frr/zebra.vrf.route-map.frr.j2
@@ -1,6 +1,10 @@
!
{% if name is vyos_defined %}
{% for vrf, vrf_config in name.items() %}
+{# code path required for vrf_vni.py as we will only render the required VR configuration and not all of them #}
+{% if only_vrf is vyos_defined and vrf is not vyos_defined(only_vrf) %}
+{% continue %}
+{% endif %}
vrf {{ vrf }}
{% if vrf_config.ip.protocol is vyos_defined %}
{% for protocol_name, protocol_config in vrf_config.ip.protocol.items() %}
@@ -15,7 +19,7 @@ vrf {{ vrf }}
ipv6 protocol {{ protocol_name }} route-map {{ protocol_config.route_map }}
{% endfor %}
{% endif %}
-{% if vrf_config.vni is vyos_defined %}
+{% if vrf_config.vni is vyos_defined and no_vni is not vyos_defined %}
vni {{ vrf_config.vni }}
{% endif %}
exit-vrf