From 628db87bda8b124ffb23426daf2670de692a3f08 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 6 May 2021 20:00:37 +0200 Subject: vrf: ospf: T3523: add route-map support for kernel routes --- data/templates/frr/ospf.frr.tmpl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'data/templates') 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 %} -! -- cgit v1.2.3