The default value 0 means no DoT probes are scheduled.
DoT probes are used to check if an authoritative server's IP address supports DoT.
-If the probe determines an IP address supports DoT, the Recursor will use DoT to contact it for subsequent queries.
+If the probe determines an IP address supports DoT, the Recursor will use DoT to contact it for subsequent queries until a failure occurs.
+After a failure, the Recursor will stop using DoT for that specific IP address for a while.
The results of probes are remembered and can be viewed by the ``rec_control dump-dot-probe-map`` command.
If the maximum number of pending probes is reached, no probes will be scheduled, even if no DoT status is known for an address.
If the result of a probe is not yet available, the Recursor will contact the authoritative server in the regular way, unless an authoritative server is configured to be contacted over DoT always using :ref:`setting-dot-to-auth-names`.
In that case no probe will be scheduled.
+
Note::
DoT probing is an experimental feature.
Please test thoroughly if it is suitable in your specific production environment before enabling.
void runTasks(size_t max, bool logErrors)
{
for (size_t count = 0; count < max; count++) {
- pdns::ResolveTask task;
- {
- auto lock = s_taskQueue.lock();
- if (lock->queue.empty()) {
- return;
- }
- task = lock->queue.pop();
- }
- bool expired = task.run(logErrors);
- if (expired) {
- s_taskQueue.lock()->queue.incExpired();
+ if (!runTaskOnce(logErrors)) {
+ // No more tasks in queue
+ break;
}
}
}
-void runTaskOnce(bool logErrors)
+bool runTaskOnce(bool logErrors)
{
pdns::ResolveTask task;
{
auto lock = s_taskQueue.lock();
if (lock->queue.empty()) {
- return;
+ return false;
}
task = lock->queue.pop();
}
if (expired) {
s_taskQueue.lock()->queue.incExpired();
}
+ return true;
}
void pushAlmostExpiredTask(const DNSName& qname, uint16_t qtype, time_t deadline)
struct ResolveTask;
}
void runTasks(size_t max, bool logErrors);
-void runTaskOnce(bool logErrors);
+bool runTaskOnce(bool logErrors);
void pushAlmostExpiredTask(const DNSName& qname, uint16_t qtype, time_t deadline);
void pushResolveTask(const DNSName& qname, uint16_t qtype, time_t now, time_t deadline);
bool pushTryDoTTask(const DNSName& qname, uint16_t qtype, const ComboAddress& ip, time_t deadline, const DNSName& nsname);
{
DNSName d_qname;
uint16_t d_qtype;
- // Deadline is not part of index and <
+ // Deadline is not part of index and not used by operator<()
time_t d_deadline;
// Whether to run this task in regular mode (false) or in the mode that refreshes almost expired tasks
bool d_refreshMode;
TaskFunction d_func;
// IP used by DoT probe tasks
ComboAddress d_ip;
- // NS name used by DoT probe task
+ // NS name used by DoT probe task, not part of index and not used by operator<()
DNSName d_nsname;
bool operator<(const ResolveTask& a) const