From 4f9aa30f86ae589ea6303700a25393048b1e66f3 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 6 May 2021 19:26:45 +0200 Subject: vrf: bgp: T3523: add route-map support for kernel routes --- data/templates/frr/bgp.frr.tmpl | 14 ++++++++++---- .../include/bgp/protocol-common-config.xml.i | 1 + interface-definitions/protocols-bgp.xml.in | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl index 8090e154d..0245c875e 100644 --- a/data/templates/frr/bgp.frr.tmpl +++ b/data/templates/frr/bgp.frr.tmpl @@ -214,6 +214,15 @@ {% endif %} {% endmacro %} ! +{% if vrf is defined and vrf is not none and route_map is defined and route_map is not none %} +vrf {{ vrf }} + ip protocol bgp route-map {{ route_map }} + exit-vrf +! +{% elif route_map is defined and route_map is not none %} +ip protocol bgp route-map {{ route_map }} +{% endif %} +! router bgp {{ local_as }} {{ 'vrf ' ~ vrf if vrf is defined and vrf is not none }} {% if parameters is defined and parameters.ebgp_requires_policy is defined %} bgp ebgp-requires-policy @@ -469,8 +478,5 @@ router bgp {{ local_as }} {{ 'vrf ' ~ vrf if vrf is defined and vrf is not none {% if timers is defined and timers.keepalive is defined and timers.holdtime is defined %} timers bgp {{ timers.keepalive }} {{ timers.holdtime }} {% endif %} -! -{% if route_map is defined and route_map is not none %} -ip protocol bgp route-map {{ route_map }} -{% endif %} + end ! \ No newline at end of file diff --git a/interface-definitions/include/bgp/protocol-common-config.xml.i b/interface-definitions/include/bgp/protocol-common-config.xml.i index d85ca4b79..125a81b14 100644 --- a/interface-definitions/include/bgp/protocol-common-config.xml.i +++ b/interface-definitions/include/bgp/protocol-common-config.xml.i @@ -1448,6 +1448,7 @@ #include +#include BGP protocol timers diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in index 8589ffba5..e1a822999 100644 --- a/interface-definitions/protocols-bgp.xml.in +++ b/interface-definitions/protocols-bgp.xml.in @@ -9,7 +9,6 @@ #include - #include -- cgit v1.2.3