mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
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.
This commit is contained in:
parent
82d83f0fe1
commit
3c0ca04ad3
Notes:
sideshowbarker
2024-07-19 07:01:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3c0ca04ad31
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue