diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-06-10 12:58:47 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-06-11 22:10:47 +0200 |
commit | 62461c73fd6e6616a48d6319d461d89239e4ee2f (patch) | |
tree | d47062d68c29f4907b2dc6109112c56d30fc0770 | |
parent | 927c054d9236c2c34ca43c1cbfff10fcfd7f5077 (diff) | |
download | vyos-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.
-rw-r--r-- | data/templates/dns-forwarding/recursor.conf.tmpl | 4 | ||||
-rwxr-xr-x | src/conf_mode/dns_forwarding.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/data/templates/dns-forwarding/recursor.conf.tmpl b/data/templates/dns-forwarding/recursor.conf.tmpl index 9d1e019fa..9aea00de5 100644 --- a/data/templates/dns-forwarding/recursor.conf.tmpl +++ b/data/templates/dns-forwarding/recursor.conf.tmpl @@ -22,8 +22,8 @@ max-negative-ttl={{ negative_ttl }} # ignore-hosts-file export-etc-hosts={{ export_hosts_file }} -# listen-on -local-address={{ listen_on | join(',') }} +# listen-address +local-address={{ listen_address | join(',') }} # dnssec dnssec={{ dnssec }} 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( |