summaryrefslogtreecommitdiff
path: root/src/conf_mode/dns_forwarding.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-19 22:32:18 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-19 22:32:18 +0200
commite0797331774a02ca23e8363fbcfe5a49fb3ca2bd (patch)
tree31de64beb93c22dbbdd60d19858f6c726502c0d6 /src/conf_mode/dns_forwarding.py
parent670536709b693f9b312a1f3da354d85eaf8a13b3 (diff)
downloadvyos-1x-e0797331774a02ca23e8363fbcfe5a49fb3ca2bd.tar.gz
vyos-1x-e0797331774a02ca23e8363fbcfe5a49fb3ca2bd.zip
dns: forwarding: T2900: restore proper Config() level in verify()
Despite the fact that running verify on Config() is "bad" and "not as intended" the level of the configuration must match the keys that are checked by exits(). Re-set proper Config() level before querying the system nodes.
Diffstat (limited to 'src/conf_mode/dns_forwarding.py')
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index 51631dc16..53bc37882 100755
--- a/src/conf_mode/dns_forwarding.py
+++ b/src/conf_mode/dns_forwarding.py
@@ -127,6 +127,7 @@ def verify(conf, dns):
f'Error: No server configured for domain {domain}'))
no_system_nameservers = False
+ conf.set_level([])
if dns['system'] and not (
conf.exists(['system', 'name-server']) or
conf.exists(['system', 'name-servers-dhcp']) ):