summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>