diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-10-02 12:02:57 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-10-02 12:02:57 +0200 |
commit | 8e6c48563d1612916bd7fcc665d70bfa77ec5667 (patch) | |
tree | 4ba02338b0b19aedf5a4a454eb870587f62213f0 | |
parent | eab6e6830a566af647d7e1b24197bf945788c3d0 (diff) | |
download | vyos-1x-8e6c48563d1612916bd7fcc665d70bfa77ec5667.tar.gz vyos-1x-8e6c48563d1612916bd7fcc665d70bfa77ec5667.zip |
dns: forwarding: T3882: remove deprecated code to work with PowerDNS 4.5
-rw-r--r-- | data/templates/dns-forwarding/recursor.conf.tmpl | 3 | ||||
-rwxr-xr-x | src/conf_mode/dns_forwarding.py | 15 |
2 files changed, 1 insertions, 17 deletions
diff --git a/data/templates/dns-forwarding/recursor.conf.tmpl b/data/templates/dns-forwarding/recursor.conf.tmpl index 8799718b0..d460775c0 100644 --- a/data/templates/dns-forwarding/recursor.conf.tmpl +++ b/data/templates/dns-forwarding/recursor.conf.tmpl @@ -10,8 +10,7 @@ threads=1 allow-from={{ allow_from | join(',') }} log-common-errors=yes non-local-bind=yes -query-local-address={{ source_address_v4 | join(',') }} -query-local-address6={{ source_address_v6 | join(',') }} +query-local-address={{ source_address | join(',') }} lua-config-file=recursor.conf.lua # cache-size diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py index c44e6c974..06366362a 100755 --- a/src/conf_mode/dns_forwarding.py +++ b/src/conf_mode/dns_forwarding.py @@ -66,21 +66,6 @@ def get_config(config=None): if conf.exists(base_nameservers_dhcp): dns.update({'system_name_server_dhcp': conf.return_values(base_nameservers_dhcp)}) - # Split the source_address property into separate IPv4 and IPv6 lists - # NOTE: In future versions of pdns-recursor (> 4.4.0), this logic can be removed - # as both IPv4 and IPv6 addresses can be specified in a single setting. - source_address_v4 = [] - source_address_v6 = [] - - for source_address in dns['source_address']: - if is_ipv6(source_address): - source_address_v6.append(source_address) - else: - source_address_v4.append(source_address) - - dns.update({'source_address_v4': source_address_v4}) - dns.update({'source_address_v6': source_address_v6}) - return dns def verify(dns): |