summaryrefslogtreecommitdiff
path: root/data/templates/frr/ospfd.frr.j2
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-03-02 16:51:00 +0100
committerGitHub <noreply@github.com>2024-03-02 16:51:00 +0100
commitae65ac2eaac23a9fbca51701f53c5fe2d4e337eb (patch)
tree84b67552e892157b56d1e29534b3202b9c8bc481 /data/templates/frr/ospfd.frr.j2
parenta2356f7418d4ba27b0cd08a7506d672514729f3a (diff)
parent1ddb50159209cbfbff49b8bd4a9f81557bf08116 (diff)
downloadvyos-1x-ae65ac2eaac23a9fbca51701f53c5fe2d4e337eb.tar.gz
vyos-1x-ae65ac2eaac23a9fbca51701f53c5fe2d4e337eb.zip
Merge pull request #3076 from vyos/mergify/bp/sagitta/pr-3073
ospfv3: allow metric and metric-type on redistributed routes (backport #3073)
Diffstat (limited to 'data/templates/frr/ospfd.frr.j2')
-rw-r--r--data/templates/frr/ospfd.frr.j28
1 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/frr/ospfd.frr.j2 b/data/templates/frr/ospfd.frr.j2
index 040628e82..ab074b6a2 100644
--- a/data/templates/frr/ospfd.frr.j2
+++ b/data/templates/frr/ospfd.frr.j2
@@ -214,13 +214,13 @@ router ospf {{ 'vrf ' ~ vrf if vrf is vyos_defined }}
passive-interface default
{% endif %}
{% if redistribute is vyos_defined %}
-{% for protocol, protocols_options in redistribute.items() %}
+{% for protocol, options in redistribute.items() %}
{% if protocol == 'table' %}
-{% for table, table_options in protocols_options.items() %}
- redistribute {{ protocol }} {{ table }} {{ 'metric ' + table_options.metric if table_options.metric is vyos_defined }} {{ 'metric-type ' + table_options.metric_type if table_options.metric_type is vyos_defined }} {{ 'route-map ' + table_options.route_map if table_options.route_map is vyos_defined }}
+{% for table, table_options in options.items() %}
+ redistribute {{ protocol }} {{ table }} {{ 'metric ' ~ table_options.metric if table_options.metric is vyos_defined }} {{ 'metric-type ' ~ table_options.metric_type if table_options.metric_type is vyos_defined }} {{ 'route-map ' ~ table_options.route_map if table_options.route_map is vyos_defined }}
{% endfor %}
{% else %}
- redistribute {{ protocol }} {{ 'metric ' + protocols_options.metric if protocols_options.metric is vyos_defined }} {{ 'metric-type ' + protocols_options.metric_type if protocols_options.metric_type is vyos_defined }} {{ 'route-map ' + protocols_options.route_map if protocols_options.route_map is vyos_defined }}
+ redistribute {{ protocol }} {{ 'metric ' ~ options.metric if options.metric is vyos_defined }} {{ 'metric-type ' ~ options.metric_type if options.metric_type is vyos_defined }} {{ 'route-map ' ~ options.route_map if options.route_map is vyos_defined }}
{% endif %}
{% endfor %}
{% endif %}