summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-06 20:00:37 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-06 20:00:37 +0200
commit628db87bda8b124ffb23426daf2670de692a3f08 (patch)
treea7a7165795982580ba1e39ecea7cc0f33c584f60
parentae5e67d3bc2ee26fe6ecaac0f0e6329d24469c4c (diff)
downloadvyos-1x-628db87bda8b124ffb23426daf2670de692a3f08.tar.gz
vyos-1x-628db87bda8b124ffb23426daf2670de692a3f08.zip
vrf: ospf: T3523: add route-map support for kernel routes
-rw-r--r--data/templates/frr/ospf.frr.tmpl13
-rw-r--r--interface-definitions/include/ospf/protocol-common-config.xml.i1
-rw-r--r--interface-definitions/protocols-ospf.xml.in1
3 files changed, 10 insertions, 5 deletions
diff --git a/data/templates/frr/ospf.frr.tmpl b/data/templates/frr/ospf.frr.tmpl
index a47c64c89..6283ad4e5 100644
--- a/data/templates/frr/ospf.frr.tmpl
+++ b/data/templates/frr/ospf.frr.tmpl
@@ -50,6 +50,15 @@ interface {{ iface }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% endfor %}
{% endif %}
!
+{% if vrf is defined and vrf is not none and route_map is defined and route_map is not none %}
+vrf {{ vrf }}
+ ip protocol ospf route-map {{ route_map }}
+ exit-vrf
+!
+{% elif route_map is defined and route_map is not none %}
+ip protocol ospf route-map {{ route_map }}
+{% endif %}
+!
router ospf {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% if access_list is defined and access_list is not none %}
{% for acl, acl_config in access_list.items() %}
@@ -177,7 +186,3 @@ router ospf {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
timers throttle spf {{ timers.throttle.spf.delay }} {{ timers.throttle.spf.initial_holdtime }} {{ timers.throttle.spf.max_holdtime }}
{% endif %}
!
-{% if route_map is defined and route_map is not none %}
-ip protocol ospf route-map {{ route_map }}
-{% endif %}
-!
diff --git a/interface-definitions/include/ospf/protocol-common-config.xml.i b/interface-definitions/include/ospf/protocol-common-config.xml.i
index 2993a3dfb..db39b1a86 100644
--- a/interface-definitions/include/ospf/protocol-common-config.xml.i
+++ b/interface-definitions/include/ospf/protocol-common-config.xml.i
@@ -697,6 +697,7 @@
</leafNode>
</children>
</node>
+#include <include/route-map.xml.i>
<node name="timers">
<properties>
<help>Adjust routing timers</help>
diff --git a/interface-definitions/protocols-ospf.xml.in b/interface-definitions/protocols-ospf.xml.in
index eae522893..b3c063d0d 100644
--- a/interface-definitions/protocols-ospf.xml.in
+++ b/interface-definitions/protocols-ospf.xml.in
@@ -9,7 +9,6 @@
</properties>
<children>
#include <include/ospf/protocol-common-config.xml.i>
- #include <include/route-map.xml.i>
</children>
</node>
</children>