summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-03 20:44:42 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-03 20:44:42 +0200
commit5f1c1ae4770fe36b5290f34d2f3a248c6b1a0ddb (patch)
treed468b57f4eb32ebdec321319b8a5e3dbed209146 /data/templates
parent6ad00236d7eae942c480825384fdd8a032944da8 (diff)
downloadvyos-1x-5f1c1ae4770fe36b5290f34d2f3a248c6b1a0ddb.tar.gz
vyos-1x-5f1c1ae4770fe36b5290f34d2f3a248c6b1a0ddb.zip
bgp: T3798: add support for neighbor local-as <n> replace-as
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/frr/bgpd.frr.tmpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/data/templates/frr/bgpd.frr.tmpl b/data/templates/frr/bgpd.frr.tmpl
index 96815836b..4ac2127cb 100644
--- a/data/templates/frr/bgpd.frr.tmpl
+++ b/data/templates/frr/bgpd.frr.tmpl
@@ -46,8 +46,9 @@
neighbor {{ neighbor }} {{ graceful_restart }}
{% endif %}
{% if config.local_as is defined and config.local_as is not none %}
-{% for local_asn in config.local_as %}
- neighbor {{ neighbor }} local-as {{ local_asn }} {{ 'no-prepend' if config.local_as[local_asn].no_prepend is defined }}
+{% for local_asn, local_asn_config in config.local_as.items() %}
+{# There can be only one local-as value, this is checked in the Python code #}
+ neighbor {{ neighbor }} local-as {{ local_asn }} {{ 'no-prepend' if local_asn_config.no_prepend is defined }} {{ 'replace-as' if local_asn_config.replace_as is defined }}
{% endfor %}
{% endif %}
{% if config.override_capability is defined %}