diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-03 14:18:53 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-03 14:24:54 +0200 |
commit | 3c0ca04ad31a1c25af03d0b025f82915d5cf28dc (patch) | |
tree | 8be9f1c69027dbaaec53769e8574ddbf7e7b80e3 | |
parent | 82d83f0fe149c13b50abd6f666530d4354414393 (diff) | |
download | serenity-3c0ca04ad31a1c25af03d0b025f82915d5cf28dc.zip |
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.
-rw-r--r-- | Servers/LookupServer/LookupServer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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<String> LookupServer::lookup(const String& hostname, bool& did_timeout, u Vector<String, 8> responses; Vector<DNSAnswer, 8> 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); |