need to be able to accept most-specific prefixes from downstreams

master
FAELIX SALT 5 years ago
parent 43bdf0f0cc
commit 29cd4ee90e

@ -1214,7 +1214,7 @@ policy {
continue {% if group['continue'] == 'next' %}{{ loop.index+1 }}{% else %}{{ group['continue'] }}{% endif %} continue {% if group['continue'] == 'next' %}{{ loop.index+1 }}{% else %}{{ group['continue'] }}{% endif %}
{% endif %} {% endif %}
set { set {
{% if 'set-community' in group %}community {{ group['set-community'] }}{% endif %} {% if 'add-community' in group %}community "additive {{ group['add-community'] }}"{% elif 'set-community' in group %}community {{ group['set-community'] }}{% endif %}
{% if 'set-local-preference' in group %}local-preference {{ group['set-local-preference'] }}{% endif %} {% if 'set-local-preference' in group %}local-preference {{ group['set-local-preference'] }}{% endif %}
} }
} }
@ -1232,8 +1232,12 @@ policy {
rule {{ loop.index }} { rule {{ loop.index }} {
action permit action permit
prefix {{ prefix['prefix'] }} prefix {{ prefix['prefix'] }}
{% if prefix_data['bgpq3'].get('most-specific',False) %}
le 32
{% else %}
{% if prefix.get('less-equal',None) != None %}le {{ prefix['less-equal'] }}{% endif %} {% if prefix.get('less-equal',None) != None %}le {{ prefix['less-equal'] }}{% endif %}
{% if prefix.get('greater-equal',None) != None %}ge {{ prefix['greater-equal'] }}{% endif %} {% if prefix.get('greater-equal',None) != None %}ge {{ prefix['greater-equal'] }}{% endif %}
{% endif %}
} }
{% endfor %} {% endfor %}
{% elif 'static' in prefix_data %} {% elif 'static' in prefix_data %}
@ -1263,8 +1267,12 @@ policy {
rule {{ loop.index }} { rule {{ loop.index }} {
action permit action permit
prefix {{ prefix['prefix'] }} prefix {{ prefix['prefix'] }}
{% if prefix_data['bgpq3'].get('most-specific',False) %}
le 128
{% else %}
{% if prefix.get('less-equal',None) != None %}le {{ prefix['less-equal'] }}{% endif %} {% if prefix.get('less-equal',None) != None %}le {{ prefix['less-equal'] }}{% endif %}
{% if prefix.get('greater-equal',None) != None %}ge {{ prefix['greater-equal'] }}{% endif %} {% if prefix.get('greater-equal',None) != None %}ge {{ prefix['greater-equal'] }}{% endif %}
{% endif %}
} }
{% endfor %} {% endfor %}
{% elif 'static' in prefix_data %} {% elif 'static' in prefix_data %}

Loading…
Cancel
Save