From f828b89cbd0975bbabdbcebc0aaf3f1ff6833861 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 10 Feb 2018 12:16:18 +0100 Subject: [PATCH] skip empty srv records --- src/main/java/eu/siacs/conversations/utils/Resolver.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/utils/Resolver.java b/src/main/java/eu/siacs/conversations/utils/Resolver.java index d12b95368..442b2d57e 100644 --- a/src/main/java/eu/siacs/conversations/utils/Resolver.java +++ b/src/main/java/eu/siacs/conversations/utils/Resolver.java @@ -99,6 +99,9 @@ public class Resolver { ResolverResult result = resolveWithFallback(dnsName, SRV.class); List results = new ArrayList<>(); for (SRV record : result.getAnswersOrEmptySet()) { + if (record.name.length() == 0 && record.priority == 0) { + continue; + } final boolean addedIPv4 = results.addAll(resolveIp(record, A.class, result.isAuthenticData(), directTls)); results.addAll(resolveIp(record, AAAA.class, result.isAuthenticData(), directTls)); if (!addedIPv4 && !Thread.currentThread().isInterrupted()) {