Commit f9e683f3 authored by Ales Mrazek's avatar Ales Mrazek

some corrections

parent 7c9c9a54
Pipeline #44623 passed with stages
in 1 minute and 9 seconds
......@@ -134,7 +134,7 @@ class Generator:
"({0}) to ip address ".format(str(sz["nameserver"])))
if stub_addr:
self.kresd_conf += "STUB(" + str(stub_addr)[1:-1] + ")\n"
self.kresd_conf += "policy.STUB(" + str(stub_addr)[1:-1] + ")\n"
# hints
if 'hints' in resolver_conf:
......@@ -245,7 +245,7 @@ class Generator:
for nta in dnssec_conf['negative-trust-anchors']:
insecure.append(str(nta))
self.kresd_conf += str("trust_anchors.set_insecure({" + str(insecure)[1:-1]) + "})\n"
self.kresd_conf += str("trust_anchors.negative({" + str(insecure)[1:-1]) + "})\n"
def _cache_kresd(self, cache_conf: dict) -> None:
# max-size
......@@ -265,7 +265,7 @@ class Generator:
def _dns64_kresd(self, dns64_conf: dict) -> None:
if 'prefix' in dns64_conf:
self.kresd_conf += str("modules.load('dns64')\ndns64.config('{}')\n".format(dns64_conf['prefix']))
self.kresd_conf += str("modules.load('dns64')\nmodules = {dns64 = '"+dns64_conf['prefix']+"'}\n")
########### KRESD ONLY ###########
......@@ -320,7 +320,7 @@ class Generator:
self.kresd_conf += can_hint
def _resolver_hostsfile_kresd(self, hostsfile_conf: dict):
self.kresd_conf += "hints.add_hosts({0})\n".format(hostsfile_conf)
self.kresd_conf += "hints.add_hosts('{0}')\n".format(hostsfile_conf)
########### UNBOUND COMMON ###########
......
......@@ -6,19 +6,19 @@ domain_name = compile('^\.$|((([a-z0-9]+(-[a-z0-9]+)*\.)+([a-z]{2,}|)))$')
# IPv4 address format checker
ipv4_address = compile('^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$')
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$')
# IPv6 address format checker
ipv6_address = compile('^(([0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4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|'
+ '(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|'
+ '([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}'
+ '(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$')
# IPv6 prefix format checker
ipv6_prefix = compile('^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}'
......
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