Fix default-port TLSA lookup done by callout. Bug 1602
[users/heiko/exim.git] / src / src / transports / smtp.c
index 3c983220d051ca26e795118371596f3be7c2a86b..6a8fbc43954eb13c663adde522c64c5a142e9a9a 100644 (file)
@@ -1450,11 +1450,12 @@ if (continue_hostname == NULL)
 
     if (host->dnssec == DS_YES)
       {
-      if(  dane_required
-       || verify_check_given_host(&ob->hosts_try_dane, host) == OK
+      if(  (  dane_required
+          || verify_check_given_host(&ob->hosts_try_dane, host) == OK
+          )
+       && (rc = tlsa_lookup(host, &tlsa_dnsa, dane_required, &dane)) != OK
        )
-       if ((rc = tlsa_lookup(host, &tlsa_dnsa, dane_required, &dane)) != OK)
-         return rc;
+       return rc;
       }
     else if (dane_required)
       {