]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Set `QR=1` for responses triggered by timeout response rules
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 5 Feb 2026 15:55:00 +0000 (16:55 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 5 Feb 2026 15:59:37 +0000 (16:59 +0100)
These are, after all, supposed to be responses by all the rules and
actions that are processing them.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist.cc

index d5ddb7acca9491b2f749d4e7fec5d643d54345b1..4976699d3fe51626214b94cf8e6cac1bab9b0da3 100644 (file)
@@ -1683,6 +1683,8 @@ bool handleTimeoutResponseRules(const std::vector<dnsdist::rules::ResponseRuleAc
     memset(&header, 0, sizeof(header));
     header.id = ids.origID;
     restoreFlags(&header, ids.origFlags);
+    // set QR=1 since this is a response rule
+    header.qr = 1;
     // do not set the qdcount, otherwise the protobuf code will choke on it
     // while trying to parse the response RRs
     return true;