From 9b44fb16ee2af648fa60cab7dfbcc8986e8ad539 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 25 Apr 2021 18:32:08 +0200 Subject: policy: T3497: add verify() that prefix-lists must carry a defined prefix --- data/templates/frr/policy.frr.tmpl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'data/templates') diff --git a/data/templates/frr/policy.frr.tmpl b/data/templates/frr/policy.frr.tmpl index 4f4b8705d..881afa21f 100644 --- a/data/templates/frr/policy.frr.tmpl +++ b/data/templates/frr/policy.frr.tmpl @@ -118,7 +118,9 @@ ip prefix-list {{ prefix_list }} description {{ prefix_list_config.description } {% endif %} {% if prefix_list_config.rule is defined and prefix_list_config.rule is not none %} {% for rule, rule_config in prefix_list_config.rule.items() | natural_sort %} +{% if rule_config.prefix is defined and rule_config.prefix is not none %} ip prefix-list {{ prefix_list }} seq {{ rule }} {{ rule_config.action }} {{ rule_config.prefix }} {{ 'ge ' + rule_config.ge if rule_config.ge is defined }} {{ 'le ' + rule_config.le if rule_config.le is defined }} +{% endif %} {% endfor %} {% endif %} {% endfor %} @@ -131,7 +133,9 @@ ipv6 prefix-list {{ prefix_list }} description {{ prefix_list_config.description {% endif %} {% if prefix_list_config.rule is defined and prefix_list_config.rule is not none %} {% for rule, rule_config in prefix_list_config.rule.items() | natural_sort %} +{% if rule_config.prefix is defined and rule_config.prefix is not none %} ipv6 prefix-list {{ prefix_list }} seq {{ rule }} {{ rule_config.action }} {{ rule_config.prefix }} {{ 'ge ' + rule_config.ge if rule_config.ge is defined }} {{ 'le ' + rule_config.le if rule_config.le is defined }} +{% endif %} {% endfor %} {% endif %} {% endfor %} -- cgit v1.2.3