mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
Unbound: disabling the first DNS override entry invalides config. closes https://github.com/opnsense/core/issues/5798
This commit is contained in:
parent
03f43d6c5b
commit
cdcf22e80d
@ -1,10 +1,12 @@
|
||||
{% if not helpers.empty('OPNsense.unboundplus.domains.domain') %}
|
||||
{% set forwardlocal = namespace(found=false) %}
|
||||
{% set prev_domain = namespace(name='') %}
|
||||
{% for domain in helpers.toList('OPNsense.unboundplus.domains.domain', 'domain') %}
|
||||
{% if domain.enabled == '1' %}
|
||||
{% if not loop.previtem or loop.previtem.domain != domain.domain %}
|
||||
{% if prev_domain.name != domain.domain %}
|
||||
forward-zone:
|
||||
name: "{{ domain.domain }}"
|
||||
{% set prev_domain.name = domain.domain %}
|
||||
{% if domain.server.startswith('127.') or domain.server == '::1' %}
|
||||
{% set forwardlocal.found = true %}
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user