diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-04-21 15:14:29 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-04-21 15:14:29 +0200 |
commit | a28f095db832e44aad66bfd73bfd8176a97c6de2 (patch) | |
tree | ff75b5c3f73576e55c828db9869d63ae04d2b275 /src/coremods | |
parent | 402779cc65f8e665c160a6902d585d7713e9b0a3 (diff) |
core_dns Don't store query class code in Question
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_dns.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index 891c6705a..999da8356 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -126,7 +126,7 @@ class Packet : public Query question.type = static_cast<QueryType>(input[pos] << 8 | input[pos + 1]); pos += 2; - question.qclass = input[pos] << 8 | input[pos + 1]; + // Skip over query class code pos += 2; return question; @@ -307,9 +307,9 @@ class Packet : public Query memcpy(&output[pos], &s, 2); pos += 2; - s = htons(q.qclass); - memcpy(&output[pos], &s, 2); - pos += 2; + // Query class, always IN + output[pos++] = 0; + output[pos++] = 1; } return pos; |