summaryrefslogtreecommitdiff
path: root/src/conf_mode/dns_forwarding.py
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-06-10 12:58:47 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-06-11 22:10:47 +0200
commit62461c73fd6e6616a48d6319d461d89239e4ee2f (patch)
treed47062d68c29f4907b2dc6109112c56d30fc0770 /src/conf_mode/dns_forwarding.py
parent927c054d9236c2c34ca43c1cbfff10fcfd7f5077 (diff)
downloadvyos-1x-62461c73fd6e6616a48d6319d461d89239e4ee2f.tar.gz
vyos-1x-62461c73fd6e6616a48d6319d461d89239e4ee2f.zip
dns forwarding: T1595: remove references to old listen-on option
As part of T1595 listen-on was removed and migrated to listen-address, but some references to it stayed in the variable names and validator error message.
Diffstat (limited to 'src/conf_mode/dns_forwarding.py')
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index 692ac2456..efe169370 100755
--- a/src/conf_mode/dns_forwarding.py
+++ b/src/conf_mode/dns_forwarding.py
@@ -40,7 +40,7 @@ default_config_data = {
'allow_from': [],
'cache_size': 10000,
'export_hosts_file': 'yes',
- 'listen_on': [],
+ 'listen_address': [],
'name_servers': [],
'negative_ttl': 3600,
'domains': [],
@@ -103,7 +103,7 @@ def get_config(arguments):
dns['name_servers'] = bracketize_ipv6_addrs(dns['name_servers'])
if conf.exists(['listen-address']):
- dns['listen_on'] = conf.return_values(['listen-address'])
+ dns['listen_address'] = conf.return_values(['listen-address'])
if conf.exists(['dnssec']):
dns['dnssec'] = conf.return_value(['dnssec'])
@@ -134,9 +134,9 @@ def verify(dns):
if dns is None:
return None
- if not dns['listen_on']:
+ if not dns['listen_address']:
raise ConfigError(
- "Error: DNS forwarding requires either a listen-address (preferred) or a listen-on option")
+ "Error: DNS forwarding requires a listen-address")
if not dns['allow_from']:
raise ConfigError(