]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Document the return values of some process* functions
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Jul 2026 12:22:47 +0000 (14:22 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Jul 2026 12:22:47 +0000 (14:22 +0200)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist.hh

index ec66a61abbafd9aaa1f33ca4a9ee307a2986b186..643f0af1e94b961cbef3dbaf4f438ca10916bab3 100644 (file)
@@ -1017,8 +1017,18 @@ enum class ProcessQueryResult : uint8_t
 
 ProcessQueryResult processQuery(DNSQuestion& dnsQuestion, std::shared_ptr<DownstreamState>& selectedBackend);
 ProcessQueryResult processQueryAfterRules(DNSQuestion& dnsQuestion, std::shared_ptr<DownstreamState>& outgoingBackend);
+/* Process a response received from a backend. The return value indicates whether
+   the response processing should continue (true) or if it should be dropped right away (false).
+*/
 bool processResponse(PacketBuffer& response, DNSResponse& dnsResponse, bool muted);
+/* Apply the decision (result) of a single rule to this query. If the decision implies to drop the query
+   `query` will be set to `true`. The return value indicates whether subsequent rules should be evaluated (true)
+   or not (false).
+*/
 bool processRulesResult(const DNSAction::Action& action, DNSQuestion& dnsQuestion, std::string& ruleresult, bool& drop);
+/* Handle the processing of a response once the rules have been applied. The return value indicates whether
+   the response processing should continue (true) or if it should be dropped right away (false).
+*/
 bool processResponseAfterRules(PacketBuffer& response, DNSResponse& dnsResponse, bool muted);
 bool processResponderPacket(std::shared_ptr<DownstreamState>& dss, PacketBuffer& response, InternalQueryState&& ids);
 bool applyRulesToResponse(const std::vector<dnsdist::rules::ResponseRuleAction>& respRuleActions, DNSResponse& dnsResponse);