From: Remi Gacogne Date: Fri, 10 Jul 2026 12:22:47 +0000 (+0200) Subject: dnsdist: Document the return values of some process* functions X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eede5e68e25e14526c2ece6998fdfbd0c4f5a2fa;p=thirdparty%2Fpdns.git dnsdist: Document the return values of some process* functions Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist.hh b/pdns/dnsdistdist/dnsdist.hh index ec66a61abb..643f0af1e9 100644 --- a/pdns/dnsdistdist/dnsdist.hh +++ b/pdns/dnsdistdist/dnsdist.hh @@ -1017,8 +1017,18 @@ enum class ProcessQueryResult : uint8_t ProcessQueryResult processQuery(DNSQuestion& dnsQuestion, std::shared_ptr& selectedBackend); ProcessQueryResult processQueryAfterRules(DNSQuestion& dnsQuestion, std::shared_ptr& 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& dss, PacketBuffer& response, InternalQueryState&& ids); bool applyRulesToResponse(const std::vector& respRuleActions, DNSResponse& dnsResponse);