diff --git a/src/main/java/eu/siacs/conversations/utils/Resolver.java b/src/main/java/eu/siacs/conversations/utils/Resolver.java index 592d8b4a0..4f91c130a 100644 --- a/src/main/java/eu/siacs/conversations/utils/Resolver.java +++ b/src/main/java/eu/siacs/conversations/utils/Resolver.java @@ -165,6 +165,7 @@ public class Resolver { Result result = new Result(); result.ip = InetAddress.getByName(domain); result.port = port; + result.authenticated = true; return result; } catch (UnknownHostException e) { return null; @@ -197,18 +198,20 @@ public class Resolver { })); fallbackThreads.add(new Thread(() -> { try { - for (CNAME cname : resolveWithFallback(record.name, CNAME.class, result.isAuthenticData()).getAnswersOrEmptySet()) { - final List ipv6s = resolveIp(record, cname.name, AAAA.class, result.isAuthenticData(), directTls); + ResolverResult cnames = resolveWithFallback(record.name, CNAME.class, result.isAuthenticData()); + for (CNAME cname : cnames.getAnswersOrEmptySet()) { + final List ipv6s = resolveIp(record, cname.name, AAAA.class, cnames.isAuthenticData(), directTls); synchronized (fallbackResults) { fallbackResults.addAll(ipv6s); } - final List ipv4s = resolveIp(record, cname.name, A.class, result.isAuthenticData(), directTls); + final List ipv4s = resolveIp(record, cname.name, A.class, cnames.isAuthenticData(), directTls); synchronized (results) { fallbackResults.addAll(ipv4s); } } + Log.d(Config.LOGTAG, Resolver.class.getSimpleName() + "cname in srv (agains RFC2782) - run slow fallback"); } catch (Throwable throwable) { - Log.d(Config.LOGTAG, Resolver.class.getSimpleName() + "error resolving srv cname-fallback records", throwable); + Log.i(Config.LOGTAG, Resolver.class.getSimpleName() + "error resolving srv cname-fallback records", throwable); } })); }