File: dns64.lua.j2

package info (click to toggle)
knot-resolver 6.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 16,392 kB
  • sloc: javascript: 42,732; ansic: 40,312; python: 12,616; cpp: 2,121; sh: 1,997; xml: 193; makefile: 181
file content (24 lines) | stat: -rw-r--r-- 562 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{% from 'macros/common_macros.lua.j2' import string_table %}

{% if cfg.dns64.enable %}

-- Enable DNS64 by loading module
modules.load('dns64')

-- Configure DNS64 module
dns64.config({
    prefix = '{{ cfg.dns64.prefix.to_std().network_address|string }}',
{% if cfg.dns64.reverse_ttl %}
    rev_ttl = {{ cfg.dns64.reverse_ttl.seconds() }},
{% endif %}
{% if cfg.dns64.exclude_subnets %}
    exclude_subnets = {{ string_table(cfg.dns64.exclude_subnets) }},
{% endif %}
})

{% else %}

-- Disable DNS64 by unloading module
-- modules.unload('dns64')

{% endif %}