aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-02-10 19:38:40 +0100
committerChristian Schneppe <christian@pix-art.de>2018-02-10 19:38:40 +0100
commitffba95da5691912edea172bae80b062dacc63540 (patch)
tree0d5187864108aa33e707dda005b64739b928ff01 /src/main
parentcf577ea140738b2d7d111f1d0b59636062dcddeb (diff)
skip empty srv records
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/utils/Resolver.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/Resolver.java b/src/main/java/de/pixart/messenger/utils/Resolver.java
index 32ed1e7c7..8f8138cb3 100644
--- a/src/main/java/de/pixart/messenger/utils/Resolver.java
+++ b/src/main/java/de/pixart/messenger/utils/Resolver.java
@@ -99,6 +99,9 @@ public class Resolver {
ResolverResult<SRV> result = resolveWithFallback(dnsName, SRV.class);
List<Result> 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()) {