From e8da1c87f158898cdeb0ca3a16127701c7e8e28b Mon Sep 17 00:00:00 2001 From: Jernej Jakob Date: Thu, 11 Jun 2020 08:34:39 +0200 Subject: dns forwarding: T2486: change internal handling of 'system' config node Remove manual retrieval of 'system name-server' from config and adding it to the name servers list, as this is now handled by simply adding a 'system' tag in vyos-hostsd. --- src/conf_mode/dns_forwarding.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/conf_mode') diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py index 959c09bf8..5ee8c53c2 100755 --- a/src/conf_mode/dns_forwarding.py +++ b/src/conf_mode/dns_forwarding.py @@ -41,6 +41,7 @@ default_config_data = { 'listen_address': [], 'name_servers': [], 'negative_ttl': 3600, + 'system': False, 'domains': {}, 'dnssec': 'process-no-validate' } @@ -86,16 +87,7 @@ def get_config(conf): conf.return_values(['name-server'])) if conf.exists(['system']): - conf.set_level(['system']) - system_name_servers = [] - system_name_servers = conf.return_values(['name-server']) - if not system_name_servers: - print("DNS forwarding warning: No name-servers set under 'system name-server'\n") - else: - dns['name_servers'] = dns['name_servers'] + system_name_servers - conf.set_level(base) - - dns['name_servers'] = bracketize_ipv6_addrs(dns['name_servers']) + dns['system'] = True if conf.exists(['listen-address']): dns['listen_address'] = conf.return_values(['listen-address']) -- cgit v1.2.3