From 3c0ca04ad31a1c25af03d0b025f82915d5cf28dc Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 3 May 2020 14:18:53 +0200 Subject: [PATCH] LookupServer: Only pass A record responses to clients This works around an issue where we'd try responding to a LookupServer client with an empty CNAME record. --- Servers/LookupServer/LookupServer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Servers/LookupServer/LookupServer.cpp b/Servers/LookupServer/LookupServer.cpp index ea92b11faf..fe89bd97fc 100644 --- a/Servers/LookupServer/LookupServer.cpp +++ b/Servers/LookupServer/LookupServer.cpp @@ -243,6 +243,8 @@ Vector LookupServer::lookup(const String& hostname, bool& did_timeout, u Vector responses; Vector cacheable_answers; for (auto& answer : response.answers()) { + if (answer.type() != T_A) + continue; responses.append(answer.record_data()); if (!answer.has_expired()) cacheable_answers.append(answer);