summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-12 20:23:24 +0100
committerGitHub <noreply@github.com>2021-01-12 20:23:24 +0100
commit7e9f934194551ac895bfd5321bfdc146c9eca6a4 (patch)
tree849652015e4c18cffe457eb02974f55debf7d74f
parent138e7a95c21fb2928182847693e366644be6e945 (diff)
parentc067a70b235b24fa58f7800810b10cbe8b7e9b0d (diff)
downloadvyos-1x-7e9f934194551ac895bfd5321bfdc146c9eca6a4.tar.gz
vyos-1x-7e9f934194551ac895bfd5321bfdc146c9eca6a4.zip
Merge pull request #678 from sever-sever/T2387
bgp: T2387: Fix template for bgp redistribute proto ospfv3
-rw-r--r--data/templates/frr/bgp.frr.tmpl6
-rw-r--r--interface-definitions/protocols-bgp.xml.in10
2 files changed, 10 insertions, 6 deletions
diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl
index 16355a1e5..a1ff368e9 100644
--- a/data/templates/frr/bgp.frr.tmpl
+++ b/data/templates/frr/bgp.frr.tmpl
@@ -152,7 +152,11 @@ router bgp {{ asn }}
{% if protocol == 'table' %}
redistribute table {{ address_family[af].redistribute[protocol].table }}
{% else %}
- redistribute {{ protocol }}{% if address_family[af].redistribute[protocol].metric is defined %} metric {{ address_family[af].redistribute[protocol].metric }}{% endif %}{% if address_family[af].redistribute[protocol].route_map is defined %} route-map {{ address_family[af].redistribute[protocol].route_map }}{% endif %}
+{% set redistribution_protocol = protocol %}
+{% if protocol == 'ospfv3' %}
+{% set redistribution_protocol = 'ospf6' %}
+{% endif %}
+ redistribute {{ redistribution_protocol }}{% if address_family[af].redistribute[protocol].metric is defined %} metric {{ address_family[af].redistribute[protocol].metric }}{% endif %}{% if address_family[af].redistribute[protocol].route_map is defined %} route-map {{ address_family[af].redistribute[protocol].route_map }}{% endif %}
{####### we need this blank line!! #######}
{% endif %}
diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in
index 27cbc919a..c6f56ac1c 100644
--- a/interface-definitions/protocols-bgp.xml.in
+++ b/interface-definitions/protocols-bgp.xml.in
@@ -198,9 +198,9 @@
#include <include/bgp-afi-redistribute-metric-route-map.xml.i>
</children>
</node>
- <node name="ospf">
+ <node name="ospfv3">
<properties>
- <help>Redistribute OSPF routes into BGP</help>
+ <help>Redistribute OSPFv3 routes into BGP</help>
</properties>
<children>
#include <include/bgp-afi-redistribute-metric-route-map.xml.i>
@@ -282,7 +282,7 @@
<constraint>
<validator name="ipv4-address"/>
<validator name="ipv6-address"/>
- <regex>(br|bond|dum|en|eth|gnv|lo|peth|tun|vti|vxlan|wg|wlan)[0-9]+</regex>
+ <regex>(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo</regex>
</constraint>
</properties>
<children>
@@ -641,7 +641,7 @@
<constraint>
<validator name="ipv4-address"/>
<validator name="ipv6-address"/>
- <regex>(br|bond|dum|en|eth|gnv|lo|peth|tun|vti|vxlan|wg|wlan)[0-9]+</regex>
+ <regex>(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo</regex>
</constraint>
</properties>
</leafNode>
@@ -1152,7 +1152,7 @@
<constraint>
<validator name="ipv4-address"/>
<validator name="ipv6-address"/>
- <regex>(br|bond|dum|en|eth|gnv|lo|peth|tun|vti|vxlan|wg|wlan)[0-9]+</regex>
+ <regex>(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo</regex>
</constraint>
</properties>
</leafNode>