1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 01:57:35 +00:00

LookupServer: Correct some flags for DNS packets

This corrects some of the flags in the DNS packets to match
what I saw on my local network.
This commit is contained in:
Gunnar Beutner 2021-05-07 23:55:18 +02:00 committed by Andreas Kling
parent c160c6b035
commit 3304d675e1
3 changed files with 16 additions and 2 deletions

View file

@ -29,8 +29,14 @@ public:
bool is_query() const { return !m_query_or_response; }
bool is_response() const { return m_query_or_response; }
bool is_authoritative_answer() const { return m_authoritative_answer; }
bool recursion_desired() const { return m_recursion_desired; }
bool recursion_available() const { return m_recursion_available; }
void set_is_query() { m_query_or_response = false; }
void set_is_response() { m_query_or_response = true; }
void set_authoritative_answer(bool authoritative_answer) { m_authoritative_answer = authoritative_answer; }
void set_recursion_desired(bool recursion_desired) { m_recursion_desired = recursion_desired; }
void set_recursion_available(bool recursion_available) { m_recursion_available = recursion_available; }
u16 id() const { return m_id; }
void set_id(u16 id) { m_id = id; }
@ -72,7 +78,10 @@ public:
private:
u16 m_id { 0 };
u8 m_code { 0 };
bool m_authoritative_answer { false };
bool m_query_or_response { false };
bool m_recursion_desired { true };
bool m_recursion_available { true };
Vector<DNSQuestion> m_questions;
Vector<DNSAnswer> m_answers;
};