summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-04-27 19:23:14 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-04-27 19:23:14 +0200
commitee10c33eba66d20d6471d81b5f4e3484db30cfe6 (patch)
treeb160ad7cdcf0aabde79680ce3cdf96eef2f61103
parentedfe7f035ea83731b9316d40d64402411a531426 (diff)
core_dns Update DNS::Request::name to be the same as in the packet
-rw-r--r--src/coremods/core_dns.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp
index a7ed8d3ed..f4f85e253 100644
--- a/src/coremods/core_dns.cpp
+++ b/src/coremods/core_dns.cpp
@@ -444,6 +444,9 @@ class MyManager : public Manager, public Timer, public EventHandler
return;
}
+ // Update name in the original request so question checking works for PTR queries
+ req->name = p.question.name;
+
if (SocketEngine::SendTo(this, buffer, len, 0, &this->myserver.sa, this->myserver.sa_size()) != len)
throw Exception("DNS: Unable to send query");
}