Skip to content

Commit 89bd468

Browse files
authored
Fix: Use only relevant filter-lists in Junos policy statement (#2613)
The Junos policy statements should do prefix-list match only on address families used by the device Fixes #2612
1 parent a8f60ea commit 89bd468

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netsim/ansible/templates/routing/_route_policy_junos.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ policy-options {
9393
{# if entry contains a prefix, we must add different (term) entries for ipv4 and ipv6 #}
9494
{# as per juniper documentation: Prefixes specified in a from statement must be either all IPv4 addresses or all IPv6 addresses. #}
9595
{% if 'prefix' in p_entry.match|default({}) %}
96-
{% for match_af in ['ipv4', 'ipv6'] %}
96+
{% for match_af in af if match_af in ['ipv4', 'ipv6'] %}
9797
term seq{{seq}}_{{match_af}} {
9898
{{ common_route_map_entry(p_entry,match_af) }}
9999
{{ common_route_map_action(p_entry) }}

0 commit comments

Comments
 (0)