diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2023-04-02 20:25:57 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-02 20:42:39 +0200 |
commit | 7375beced3a1b323fe3bbfc46423e576ee401cbc (patch) | |
tree | 4708dfbac156da23455519453e0d00f4ca102e11 /Userland/Services | |
parent | c7409af62751cf271d195daad25675ef63e7db72 (diff) | |
download | serenity-7375beced3a1b323fe3bbfc46423e576ee401cbc.zip |
LookupServer: Put upstream DNS responses in cache
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/LookupServer/LookupServer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Services/LookupServer/LookupServer.cpp b/Userland/Services/LookupServer/LookupServer.cpp index 17dfc2ed45..522fe94050 100644 --- a/Userland/Services/LookupServer/LookupServer.cpp +++ b/Userland/Services/LookupServer/LookupServer.cpp @@ -204,8 +204,10 @@ ErrorOr<Vector<Answer>> LookupServer::lookup(Name const& name, RecordType record break; } while (--retries); if (!upstream_answers.is_empty()) { - for (auto& answer : upstream_answers) + for (auto& answer : upstream_answers) { add_answer(answer); + put_in_cache(answer); + } break; } else { if (!did_get_response) |