SyncRes::s_ecscachelimitttl = ::arg().asNum("ecs-cache-limit-ttl");
SyncRes::s_qnameminimization = ::arg().mustDo("qname-minimization");
- SyncRes::s_minimize_one_lab = ::arg().asNum("qname-minimize-one-label");
+ SyncRes::s_minimize_one_label = ::arg().asNum("qname-minimize-one-label");
SyncRes::s_max_minimize_count = ::arg().asNum("qname-max-minimize-count");
SyncRes::s_hardenNXD = SyncRes::HardenNXD::DNSSEC;
'doc' : '''
``Minimize one label`` parameter, described in :rfc:`9156`.
The value for the number of iterations of the Query Name Minimization Algorithm that should only have one label appended.
+This value has precedence over :ref:`setting-qname-max-minimize-count`.
''',
'versionadded': '5.0.0'
},
/* maximum number of QNAME minimization iterations */
unsigned int SyncRes::s_max_minimize_count; // default is 10
/* number of iterations that should only have one label appended */
-unsigned int SyncRes::s_minimize_one_lab; // default is 4
+unsigned int SyncRes::s_minimize_one_label; // default is 4
static unsigned int qmStepLen(unsigned int labels, unsigned int qnamelen, unsigned int i)
{
unsigned int step;
- if (i < SyncRes::s_minimize_one_lab) {
+ if (i < SyncRes::s_minimize_one_label) {
step = 1;
}
else if (i < SyncRes::s_max_minimize_count) {
LOG(prefix << qname << ": Step0 qname is in a forwarded domain " << fwdomain << endl);
}
- for (unsigned int i = 0; i <= qnamelen;) {
+ for (unsigned int i = 0; i <= qnamelen; i++) {
// Step 1
vector<DNSRecord> bestns;
}
}
- if (bestns.size() == 0) {
+ if (bestns.empty()) {
if (!forwarded) {
// Something terrible is wrong
LOG(prefix << qname << ": Step1 No ancestor found return ServFail" << endl);
LOG(prefix << qname << ": Step4 Resolve " << child << "|A result is " << RCode::to_s(res) << "/" << retq.size() << "/" << stopAtDelegation << endl);
if (stopAtDelegation == Stopped) {
LOG(prefix << qname << ": Delegation seen, continue at step 1" << endl);
- i++;
break;
}
static unsigned int s_max_busy_dot_probes;
static unsigned int s_max_CNAMES_followed;
static unsigned int s_max_minimize_count;
- static unsigned int s_minimize_one_lab;
+ static unsigned int s_minimize_one_label;
static const int event_trace_to_pb = 1;
static const int event_trace_to_log = 2;
SyncRes::s_save_parent_ns_set = true;
SyncRes::s_maxnsperresolve = 13;
SyncRes::s_locked_ttlperc = 0;
- SyncRes::s_minimize_one_lab = 4;
+ SyncRes::s_minimize_one_label = 4;
SyncRes::s_max_minimize_count = 10;
SyncRes::clearNSSpeeds();