Fix the damn flags

This commit is contained in:
Baptiste Wicht 2016-09-13 19:19:24 +02:00
parent dd6c90dcac
commit 77c705308e
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ int main(int argc, char* argv[]) {
auto questions = tlib::switch_endian_16(dns_header->questions);
auto answers = tlib::switch_endian_16(dns_header->answers);
auto flags = dns_header->flags;
auto flags = tlib::switch_endian_16(dns_header->flags);
auto qr = flags >> 15;
// Only handle Response

View File

@ -124,7 +124,7 @@ std::expected<std::string> tlib::dns::resolve(const std::string& domain, size_t
auto questions = tlib::switch_endian_16(dns_header->questions);
auto answers = tlib::switch_endian_16(dns_header->answers);
auto flags = dns_header->flags;
auto flags = tlib::switch_endian_16(dns_header->flags);
auto qr = flags >> 15;
// Only handle Response