]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/init.d/unbound
unbound: Fix DNS forwarder test
[ipfire-2.x.git] / src / initscripts / init.d / unbound
index 1ecbf229ea711fe04eed59e27b5ea1f7c2d61a19..6c7be6cfda8e481f7497a0c179cb19074786d04b 100644 (file)
@@ -259,9 +259,6 @@ test_name_server() {
        # Exit when the server is not reachable
        ns_is_online ${ns} || return 1
 
-       # Return 0 if validating
-       ns_is_validating ${ns} && return 0
-
        local errors
        for rr in DNSKEY DS RRSIG; do
                if ! ns_forwards_${rr} ${ns}; then
@@ -274,8 +271,13 @@ test_name_server() {
                return 3
        fi
 
-       # Is DNSSEC-aware
-       return 2
+       if ns_is_validating ${ns}; then
+               # Return 0 if validating
+               return 0
+       else
+               # Is DNSSEC-aware
+               return 2
+       fi
 }
 
 # Sends an A query to the nameserver w/o DNSSEC