summaryrefslogtreecommitdiff
path: root/data/templates/frr/bgpd.frr.j2
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-02-13 20:39:14 +0100
committerChristian Breunig <christian@breunig.cc>2025-02-13 20:39:54 +0100
commit6ab9de170c7a4ad51b60ed0c576db25831ce745a (patch)
tree450507901320a7db8dc4ecc0fb0134115093ddb7 /data/templates/frr/bgpd.frr.j2
parentc2238596f7994e51974e9a517fb7ab7e948e955f (diff)
downloadvyos-1x-6ab9de170c7a4ad51b60ed0c576db25831ce745a.tar.gz
vyos-1x-6ab9de170c7a4ad51b60ed0c576db25831ce745a.zip
bgp: T7163: add CLI route-map and metric support for "redistribute table"
* set protocols bgp address-family <ipv4-unicast|ipv6-unicast> redistribute table <n> [metric <n>] [route-map <name>]
Diffstat (limited to 'data/templates/frr/bgpd.frr.j2')
-rw-r--r--data/templates/frr/bgpd.frr.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/frr/bgpd.frr.j2 b/data/templates/frr/bgpd.frr.j2
index 2f3719fdf..3b462b4a9 100644
--- a/data/templates/frr/bgpd.frr.j2
+++ b/data/templates/frr/bgpd.frr.j2
@@ -310,8 +310,8 @@ router bgp {{ system_as }} {{ 'vrf ' ~ vrf if vrf is vyos_defined }}
{% if afi_config.redistribute is vyos_defined %}
{% for protocol, protocol_config in afi_config.redistribute.items() %}
{% if protocol == 'table' %}
-{% for table in protocol_config %}
- redistribute table-direct {{ table }}
+{% for table, table_config in protocol_config.items() %}
+ redistribute table-direct {{ table }} {{ 'metric ' ~ table_config.metric if table_config.metric is vyos_defined }} {{ 'route-map ' ~ table_config.route_map if table_config.route_map is vyos_defined }}
{% endfor %}
{% else %}
{% set redistribution_protocol = protocol %}