summaryrefslogtreecommitdiff
path: root/data/templates/frr/bgpd.frr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-04 10:18:19 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-04 10:21:28 +0200
commitdd210c92beeffae07f26dc72ab51d9a93219b582 (patch)
treeb00879af93b5e71fd8b7acaa69f650b69c25f6c5 /data/templates/frr/bgpd.frr.tmpl
parent0f6e1c99c7d5a38006542b074f0718f8f2e01cec (diff)
downloadvyos-1x-dd210c92beeffae07f26dc72ab51d9a93219b582.tar.gz
vyos-1x-dd210c92beeffae07f26dc72ab51d9a93219b582.zip
bgp: T3798: "replace-as" option can only be used when "no-prepend" is defined
Commit 5f1c1ae4 ("bgp: T3798: add support for neighbor local-as <n> replace-as") added support for a new CLI option when the local-as is changed for a specified neighbor or peer-group. There was an error in the CLI / design as the "replace-as" option can only be used when "no-prepend" is defined. Thus "no-prepend" became a <node> and the new "replace-as" leafNode is now a child of "no-prepend".
Diffstat (limited to 'data/templates/frr/bgpd.frr.tmpl')
-rw-r--r--data/templates/frr/bgpd.frr.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/frr/bgpd.frr.tmpl b/data/templates/frr/bgpd.frr.tmpl
index 4ac2127cb..987b922da 100644
--- a/data/templates/frr/bgpd.frr.tmpl
+++ b/data/templates/frr/bgpd.frr.tmpl
@@ -46,9 +46,9 @@
neighbor {{ neighbor }} {{ graceful_restart }}
{% endif %}
{% if config.local_as is defined and config.local_as is not none %}
-{% for local_asn, local_asn_config in config.local_as.items() %}
+{% for local_as, local_as_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 }}
+ neighbor {{ neighbor }} local-as {{ local_as }} {{ 'no-prepend' if local_as_config.no_prepend is defined }} {{ 'replace-as' if local_as_config.no_prepend is defined and local_as_config.no_prepend.replace_as is defined }}
{% endfor %}
{% endif %}
{% if config.override_capability is defined %}