From a28f095db832e44aad66bfd73bfd8176a97c6de2 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 21 Apr 2015 15:14:29 +0200 Subject: core_dns Don't store query class code in Question --- src/coremods/core_dns.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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(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; -- cgit v1.2.3