Commit 8c5649b2 authored by Aleš Mrázek's avatar Aleš Mrázek
Browse files

Merge remote-tracking branch 'origin/master'

parents 3e53f9c9 0dff8589
......@@ -23,31 +23,31 @@ def generate(config: dict) -> str:
if 'network' in conf:
if kresd_conf != "":
kresd_conf += "\n"
kresd_conf += Network.generate(conf['network'].value)
kresd_conf += Network.generate(conf['network'])
if 'server' in conf:
if kresd_conf != "":
kresd_conf += "\n"
kresd_conf += Server.generate(conf['server'].value)
kresd_conf += Server.generate(conf['server'])
if 'resolver' in conf:
if kresd_conf != "":
kresd_conf += "\n"
kresd_conf += Resolver.generate(conf['resolver'].value)
kresd_conf += Resolver.generate(conf['resolver'])
if 'logging' in conf:
if kresd_conf != "":
kresd_conf += "\n"
kresd_conf += Logging.generate(conf['logging'].value)
kresd_conf += Logging.generate(conf['logging'])
if 'dnssec' in conf:
if kresd_conf != "":
kresd_conf += "\n"
kresd_conf += Dnssec.generate(conf['dnssec'].value)
kresd_conf += Dnssec.generate(conf['dnssec'])
if 'cache' in conf:
if kresd_conf != "":
kresd_conf += "\n"
kresd_conf += Cache.generate(conf['cache'].value)
kresd_conf += Cache.generate(conf['cache'])
if 'dns64' in conf:
if kresd_conf != "":
kresd_conf += "\n"
kresd_conf += Dns64.generate(conf['dns64'].value)
kresd_conf += Dns64.generate(conf['dns64'])
return kresd_conf
......@@ -80,19 +80,19 @@ class Network:
if 'listen-interfaces' in network:
if network_conf != "":
network_conf += "\n"
network_conf += Network.listen_interfaces(network['listen-interfaces'].value)
network_conf += Network.listen_interfaces(network['listen-interfaces'])
if 'source-address' in network:
if network_conf != "":
network_conf += "\n"
network_conf += Network.source_address(network['source-address'].value)
network_conf += Network.source_address(network['source-address'])
if 'recursion-transport' in network:
if network_conf != "":
network_conf += "\n"
network_conf += Network.recursion_transport(network['recursion-transport'].value)
network_conf += Network.recursion_transport(network['recursion-transport'])
if 'udp-payload-size' in network:
if network_conf != "":
network_conf += "\n"
network_conf += Network.udp_payload_size(network['udp-payload-size'].value)
network_conf += Network.udp_payload_size(network['udp-payload-size'])
return network_conf
......@@ -186,45 +186,45 @@ class Resolver:
if 'stub-zones' in resolver:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.stub_zones(resolver['stub-zones'].value)
resolver_conf += Resolver.stub_zones(resolver['stub-zones'])
# hints
if 'hints' in resolver:
hints = resolver['hints']
if 'cznic-resolver-knot:hint' in hints:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.hints_hint(hints['cznic-resolver-knot:hint'].value)
resolver_conf += Resolver.hints_hint(hints['cznic-resolver-knot:hint'])
if 'cznic-resolver-knot:hosts-file' in hints:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.hints_hosts_file(hints['cznic-resolver-knot:hosts-file'].value)
resolver_conf += Resolver.hints_hosts_file(hints['cznic-resolver-knot:hosts-file'])
if 'root-hint' in hints:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.hints_root_hint(hints['root-hint'].value)
resolver_conf += Resolver.hints_root_hint(hints['root-hint'])
if 'root-zone-file' in hints:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.hints_root_zone_file(hints['root-zone-file'].value)
resolver_conf += Resolver.hints_root_zone_file(hints['root-zone-file'])
# options
if 'options' in resolver:
options = resolver['options']
if 'glue-checking' in options:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.option_glue_checking(options['glue-checking'].value)
resolver_conf += Resolver.option_glue_checking(options['glue-checking'])
if 'qname-minimisation' in options:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.option_qname_minimisation(options['qname-minimisation'].value)
resolver_conf += Resolver.option_qname_minimisation(options['qname-minimisation'])
if 'reorder-rrset' in options:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.option_reorder_rrset(options['reorder-rrset'].value)
resolver_conf += Resolver.option_reorder_rrset(options['reorder-rrset'])
if 'query-loopback' in options:
if resolver_conf != "":
resolver_conf += "\n"
resolver_conf += Resolver.option_query_loopback(options['query-loopback'].value)
resolver_conf += Resolver.option_query_loopback(options['query-loopback'])
return resolver_conf
......@@ -480,19 +480,19 @@ class Cache:
if 'max-size' in cache:
if cache_conf != "":
cache_conf += "\n"
cache_conf += Cache.max_size(cache['max-size'].value)
cache_conf += Cache.max_size(cache['max-size'])
if 'max-ttl' in cache:
if cache_conf != "":
cache_conf += "\n"
cache_conf += Cache.max_ttl(cache['max-ttl'].value)
cache_conf += Cache.max_ttl(cache['max-ttl'])
if 'min-ttl' in cache:
if cache_conf != "":
cache_conf += "\n"
cache_conf += Cache.min_ttl(cache['min-ttl'].value)
cache_conf += Cache.min_ttl(cache['min-ttl'])
if 'cznic-resolver-knot:prefill' in cache:
if cache_conf != "":
cache_conf += "\n"
cache_conf += Cache.prefill(cache['cznic-resolver-knot:prefill'].value)
cache_conf += Cache.prefill(cache['cznic-resolver-knot:prefill'])
return cache_conf
......@@ -542,7 +542,7 @@ class Dns64:
if 'prefix' in dns64:
if dns64_conf != "":
dns64_conf += "\n"
dns64_conf += Dns64.prefix(dns64['prefix'].value)
dns64_conf += Dns64.prefix(dns64['prefix'])
return dns64_conf
......
......@@ -99,7 +99,7 @@ class TrustAnchorRR:
"dnskey": {
"algorithm": algorithm,
"flags": flags,
"protocol": int(protocol),
"protocol": int(protocol.strip()),
"public-key": public_key
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment