From 33810487a8ea80cd2b44f144f761e54d6e2a7b8a Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Tue, 2 May 2023 15:08:59 +0000 Subject: T5163: Add match protocol filter for route-map Ability to match 'source-protocol' for the route-map filters set policy route-map foo rule 10 action 'permit' set policy route-map foo rule 10 match protocol 'bgp' --- data/templates/frr/policy.frr.j2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'data/templates/frr/policy.frr.j2') diff --git a/data/templates/frr/policy.frr.j2 b/data/templates/frr/policy.frr.j2 index 9b5e80aed..ed5876ae9 100644 --- a/data/templates/frr/policy.frr.j2 +++ b/data/templates/frr/policy.frr.j2 @@ -245,6 +245,10 @@ route-map {{ route_map }} {{ rule_config.action }} {{ rule }} {% if rule_config.match.peer is vyos_defined %} match peer {{ rule_config.match.peer }} {% endif %} +{% if rule_config.match.protocol is vyos_defined %} +{% set source_protocol = 'ospf6' if rule_config.match.protocol == 'ospfv3' else rule_config.match.protocol %} + match source-protocol {{ source_protocol }} +{% endif %} {% if rule_config.match.rpki is vyos_defined %} match rpki {{ rule_config.match.rpki }} {% endif %} -- cgit v1.2.3