summaryrefslogtreecommitdiff
path: root/data/templates/frr/bgpd.frr.j2
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-02-13 17:03:35 +0100
committerChristian Breunig <christian@breunig.cc>2025-02-13 17:03:35 +0100
commitb702dfc362d16e11d96debc39a2dcdcc72619277 (patch)
tree407e41789780a2d19003e36800d6588dda8d00ee /data/templates/frr/bgpd.frr.j2
parent0b28c97fa3b11758ed0dc8a8300ede2cab40707c (diff)
downloadvyos-1x-b702dfc362d16e11d96debc39a2dcdcc72619277.tar.gz
vyos-1x-b702dfc362d16e11d96debc39a2dcdcc72619277.zip
bgp: T7161: fix IPv4/IPv6 unicast AFI "redistribute table" command
Re-use existing XML constraint added via commit 8f6246da6 ("xml: T7161: provide re-usable building block for alternative routing tables") and add handy CLI completion helper. FRRouting supports redistribution of multiple non-main tables, thus make this a multi node in addition, too.
Diffstat (limited to 'data/templates/frr/bgpd.frr.j2')
-rw-r--r--data/templates/frr/bgpd.frr.j24
1 files changed, 3 insertions, 1 deletions
diff --git a/data/templates/frr/bgpd.frr.j2 b/data/templates/frr/bgpd.frr.j2
index 51a3f2564..2f3719fdf 100644
--- a/data/templates/frr/bgpd.frr.j2
+++ b/data/templates/frr/bgpd.frr.j2
@@ -310,7 +310,9 @@ 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' %}
- redistribute table {{ protocol_config.table }}
+{% for table in protocol_config %}
+ redistribute table-direct {{ table }}
+{% endfor %}
{% else %}
{% set redistribution_protocol = protocol %}
{% if protocol == 'ospfv3' %}