summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/dns.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2014-10-21 13:59:42 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-10-21 15:55:09 +0200
commit5e1172f560f4a63ed8398f326c158e9c8c1f91a8 (patch)
tree0d3bf9533478813ebee25fc4adca32d23189b44e /ipalib/plugins/dns.py
parent20761f7fcd86dbfad53af78bce2bd3892dfe8232 (diff)
downloadfreeipa-5e1172f560f4a63ed8398f326c158e9c8c1f91a8.tar.gz
freeipa-5e1172f560f4a63ed8398f326c158e9c8c1f91a8.tar.xz
freeipa-5e1172f560f4a63ed8398f326c158e9c8c1f91a8.zip
fix forwarder validation errors
Fix tests, validation in dnsconfig mod, wuser warning Reviewed-By: Petr Spacek <pspacek@redhat.com>
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r--ipalib/plugins/dns.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index 61b9e3d7a..dd1e640f4 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -3942,12 +3942,14 @@ class dnsconfig_mod(LDAPUpdate):
# test dnssec forwarders
non_dnssec_forwarders = []
not_responding_forwarders = []
- for forwarder in options.get('idnsforwarders', []):
- dnssec_status = validate_dnssec_forwarder(forwarder)
- if dnssec_status is None:
- not_responding_forwarders.append(forwarder)
- elif dnssec_status is False:
- non_dnssec_forwarders.append(forwarder)
+ forwarders = options.get('idnsforwarders')
+ if forwarders:
+ for forwarder in forwarders:
+ dnssec_status = validate_dnssec_forwarder(forwarder)
+ if dnssec_status is None:
+ not_responding_forwarders.append(forwarder)
+ elif dnssec_status is False:
+ non_dnssec_forwarders.append(forwarder)
result = super(dnsconfig_mod, self).execute(*keys, **options)
self.obj.postprocess_result(result)