diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-05-02 15:08:59 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-05-02 15:08:59 +0000 |
commit | 33810487a8ea80cd2b44f144f761e54d6e2a7b8a (patch) | |
tree | 224f679f213774274f159db40d40569097c6b728 /data/templates | |
parent | 0f224ec009aed6184691da49b8aba5a53b162770 (diff) | |
download | vyos-1x-33810487a8ea80cd2b44f144f761e54d6e2a7b8a.tar.gz vyos-1x-33810487a8ea80cd2b44f144f761e54d6e2a7b8a.zip |
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'
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/frr/policy.frr.j2 | 4 |
1 files changed, 4 insertions, 0 deletions
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 %} |