summaryrefslogtreecommitdiffstats
path: root/dnsdist.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:49:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:49:39 +0000
commita8f8cc6ab1a1b3c15f6396471bd3817ed2fcf45e (patch)
treeb9f809216f895564c90c046f072911dce3d4ee77 /dnsdist.cc
parentAdding upstream version 1.9.3. (diff)
downloaddnsdist-bb78225772582115229d10689a525698ff3c0e4b.tar.xz
dnsdist-bb78225772582115229d10689a525698ff3c0e4b.zip
Adding upstream version 1.9.4.upstream/1.9.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dnsdist.cc')
-rw-r--r--dnsdist.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/dnsdist.cc b/dnsdist.cc
index 0c99cf0..9369a55 100644
--- a/dnsdist.cc
+++ b/dnsdist.cc
@@ -1670,9 +1670,18 @@ ProcessQueryResult processQuery(DNSQuestion& dq, LocalHolders& holders, std::sha
/* we need an accurate ("real") value for the response and
to store into the IDS, but not for insertion into the
rings for example */
- struct timespec now;
+ timespec now{};
gettime(&now);
+ if ((dq.ids.qtype == QType::AXFR || dq.ids.qtype == QType::IXFR) && (dq.getProtocol() == dnsdist::Protocol::DoH || dq.getProtocol() == dnsdist::Protocol::DoQ || dq.getProtocol() == dnsdist::Protocol::DoH3)) {
+ dq.editHeader([](dnsheader& header) {
+ header.rcode = RCode::NotImp;
+ header.qr = true;
+ return true;
+ });
+ return processQueryAfterRules(dq, holders, selectedBackend);
+ }
+
if (!applyRulesToQuery(holders, dq, now)) {
return ProcessQueryResult::Drop;
}