thread_local TCPOutConnectionManager t_tcp_manager;
std::shared_ptr<Logr::Logger> g_slogout;
+bool g_paddingOutgoing;
void remoteLoggerQueueData(RemoteLoggerInterface& r, const std::string& data)
{
weWantEDNSSubnet=true;
}
- if (dnsOverTLS /* and other conditions? */) {
+ if (dnsOverTLS && g_paddingOutgoing) {
addPadding(pw, bufsize, opts);
}
void remoteLoggerQueueData(RemoteLoggerInterface&, const std::string&);
extern std::shared_ptr<Logr::Logger> g_slogout;
+extern bool g_paddingOutgoing;
class LWResException : public PDNSException
{
Whether to add EDNS padding to all responses (``always``) or only to responses for queries containing the EDNS padding option (``padded-queries-only``, the default).
In both modes, padding will only be added to responses for queries coming from `edns-padding-from`_ sources.
+.. _setting-edns-padding-out:
+
+``edns-padding-out``
+--------------------
+.. versionadded:: 4.8.0
+
+- Boolean
+- Default: yes
+
+Whether to add EDNS padding to outgoing DoT queries.
+
.. _setting-edns-padding-tag:
``edns-padding-tag``
exit(1);
}
g_paddingTag = ::arg().asNum("edns-padding-tag");
+ g_paddingOutgoing = ::arg().mustDo("edns-padding-out");
RecThreadInfo::setNumDistributorThreads(::arg().asNum("distributor-threads"));
RecThreadInfo::setNumWorkerThreads(::arg().asNum("threads"));
::arg().set("edns-padding-from", "List of netmasks (proxy IP in case of XPF or proxy-protocol presence, client IP otherwise) for which EDNS padding will be enabled in responses, provided that 'edns-padding-mode' applies") = "";
::arg().set("edns-padding-mode", "Whether to add EDNS padding to all responses ('always') or only to responses for queries containing the EDNS padding option ('padded-queries-only', the default). In both modes, padding will only be added to responses for queries coming from `edns-padding-from`_ sources") = "padded-queries-only";
::arg().set("edns-padding-tag", "Packetcache tag associated to responses sent with EDNS padding, to prevent sending these to clients for which padding is not enabled.") = "7830";
+ ::arg().setSwitch("edns-padding-out", "Whether to add EDNS padding to outgoing DoT messages") = "yes";
::arg().setSwitch("dot-to-port-853", "Force DoT connection to target port 853 if DoT compiled in") = "yes";
::arg().set("dot-to-auth-names", "Use DoT to authoritative servers with these names or suffixes") = "";