summaryrefslogtreecommitdiff
path: root/src/conf_mode/dns_forwarding.py
diff options
context:
space:
mode:
authorLucas Christian <lucas@lucasec.com>2021-10-12 22:59:52 -0700
committerLucas Christian <lucas@lucasec.com>2021-10-12 22:59:52 -0700
commit98704f45a4d261ae472e9b299080a1f06275ae81 (patch)
tree03ac36429bf1a5aae398a219e6b327bfbc3713e7 /src/conf_mode/dns_forwarding.py
parentd6a79444ff131220529938b0ff849f43f3a9e1c0 (diff)
downloadvyos-1x-98704f45a4d261ae472e9b299080a1f06275ae81.tar.gz
vyos-1x-98704f45a4d261ae472e9b299080a1f06275ae81.zip
Don't generate NTA when zone is disabled
Diffstat (limited to 'src/conf_mode/dns_forwarding.py')
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index 5a5ae4d14..23a16df63 100755
--- a/src/conf_mode/dns_forwarding.py
+++ b/src/conf_mode/dns_forwarding.py
@@ -353,8 +353,8 @@ def apply(dns):
# hostsd generates NTAs for the authoritative zones
# the list and keys() are required as get returns a dict, not list
hc.delete_authoritative_zones(list(hc.get_authoritative_zones()))
- if 'authoritative_domain' in dns:
- hc.add_authoritative_zones(list(dns['authoritative_domain'].keys()))
+ if 'authoritative_zones' in dns:
+ hc.add_authoritative_zones(list(map(lambda zone: zone['name'], dns['authoritative_zones'])))
# call hostsd to generate forward-zones and its lua-config-file
hc.apply()