diff --git a/netsim/ansible/templates/routing/_route_policy_junos.j2 b/netsim/ansible/templates/routing/_route_policy_junos.j2 index feb18e5cb9..a3974a5fa8 100644 --- a/netsim/ansible/templates/routing/_route_policy_junos.j2 +++ b/netsim/ansible/templates/routing/_route_policy_junos.j2 @@ -93,7 +93,7 @@ policy-options { {# if entry contains a prefix, we must add different (term) entries for ipv4 and ipv6 #} {# as per juniper documentation: Prefixes specified in a from statement must be either all IPv4 addresses or all IPv6 addresses. #} {% if 'prefix' in p_entry.match|default({}) %} -{% for match_af in ['ipv4', 'ipv6'] %} +{% for match_af in af if match_af in ['ipv4', 'ipv6'] %} term seq{{seq}}_{{match_af}} { {{ common_route_map_entry(p_entry,match_af) }} {{ common_route_map_action(p_entry) }}