diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-04-09 11:33:43 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-04-09 11:35:08 +0200 |
commit | b2027b99e82a7c9b113dc529e39f8aebac3dda02 (patch) | |
tree | 104ebbdcf97a79e1a1b44586d6f7dee12caa529a /data/templates | |
parent | 1085195a2c29ef608bbc8cdf1cb172a9b1fe2530 (diff) | |
download | vyos-1x-b2027b99e82a7c9b113dc529e39f8aebac3dda02.tar.gz vyos-1x-b2027b99e82a7c9b113dc529e39f8aebac3dda02.zip |
bgp: T3463: Jinja2 template re-ordering fir ebgp-requires-policy
This is a fix for commit 6f6f45c5 ("bgp: T3463: change no-ipv4-unicast order
when applying configuration") as this changed the handling of the "else" path,
which lead to failing smoketests as the "no bgp ebgp-requires-policy" option
was no longer set.
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/frr/bgp.frr.tmpl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl index 1cc876f20..cbf83e3fd 100644 --- a/data/templates/frr/bgp.frr.tmpl +++ b/data/templates/frr/bgp.frr.tmpl @@ -186,16 +186,14 @@ {% endmacro %} ! router bgp {{ local_as }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none }} -{% if parameters is defined %} -{% if parameters.ebgp_requires_policy is defined %} +{% if parameters is defined and parameters.ebgp_requires_policy is defined %} bgp ebgp-requires-policy -{% else %} +{% else %} no bgp ebgp-requires-policy -{% endif %} -{% if parameters.default is defined and parameters.default.no_ipv4_unicast is defined %} +{% endif %} +{% if parameters is defined and parameters.default is defined and parameters.default.no_ipv4_unicast is defined %} {# Option must be set before any neighbor - see https://phabricator.vyos.net/T3463 #} no bgp default ipv4-unicast -{% endif %} {% endif %} {# Workaround for T2100 until we have decided about a migration script #} no bgp network import-check |