<commit_before>#!stateconf

.params:
    stateconf.set: []
# --- end of state config ---

{# currently no support for ipv6 zones #}
{% set families = ['ipv4', 'ipv6'] %}

{% for zone, zoneinfo in params.zones.items() %}
{% set zonechain = "ZONE_" ~ zone|upper %}

{% for family in families %}

{% if family == 'ipv6' %}
{% if zonechain != 'ZONE_PUBLIC' %}
{% continue %}
{% endif %}
{% endif %}

chain_zone_{{ zone }}_{{ family }}:
  iptables.chain_present:
    - name: {{ zonechain }}
    - family: {{ family }}

{% set sourceid = 0 %}
{% for source in zoneinfo.sources %}
{% set sourceid = sourceid + 1 %}

jump_to_zone_{{ zone }}_{{ family }}_source_{{ sourceid }}:
  iptables.append:
    - table: filter
    - chain: TCPUDP
    - jump: {{ zonechain }}
    - family: {{ family }}
    - source: {{ source }}
    - save: true
    - require:
      - iptables: chain_zone_{{ zone }}_{{ family }}
      - iptables: chain_tcpudp_{{ family }}

{% endfor %}
{% endfor %}
{% endfor %}<commit_msg>iptables: Change params<commit_after>#!stateconf

.params:
    stateconf.set: []
# --- end of state config ---

{# currently no support for ipv6 zones #}
{% set families = ['ipv4', 'ipv6'] %}

{% for zone in params.zones %}
{% set zonechain = "ZONE_" ~ zone.name|upper %}

{% for family in families %}

{% if family == 'ipv6' %}
{% if zonechain != 'ZONE_PUBLIC' %}
{% continue %}
{% endif %}
{% endif %}

chain_zone_{{ zone.name }}_{{ family }}:
  iptables.chain_present:
    - name: {{ zonechain }}
    - family: {{ family }}

{% set sourceid = 0 %}
{% for source in zone.sources %}
{% set sourceid = sourceid + 1 %}

jump_to_zone_{{ zone.name }}_{{ family }}_source_{{ sourceid }}:
  iptables.append:
    - table: filter
    - chain: TCPUDP
    - jump: {{ zonechain }}
    - family: {{ family }}
    - source: {{ source }}
    - save: true
    - require:
      - iptables: chain_zone_{{ zone.name }}_{{ family }}
      - iptables: chain_tcpudp_{{ family }}

{% endfor %}
{% endfor %}
{% endfor %}
{'fraction_non_alphanumeric': 0.1936619718309859, 'fraction_numerical': 0.006036217303822937, 'mean_word_length': 2.9859719438877756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2051416', 'n_tokens_mistral': 760, 'n_tokens_neox': 677, 'n_words': 175}