You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'help' : 'Maximum outgoing queries per client query',
1585
1611
'doc' : '''
1586
1612
The maximum number of outgoing queries that will be sent out during the resolution of a single client query.
1587
1613
This is used to avoid cycles resolving names.
1588
1614
''',
1589
1615
'versionchanged': ('5.1.0', 'The default used to be 60, with an extra allowance if qname minimization was enabled. Having better algorithms allows for a lower default limit.'),
1590
1616
},
1617
+
{
1618
+
'name' : 'max_bytesperq',
1619
+
'section' : 'outgoing',
1620
+
'type' : LType.Uint64,
1621
+
'default' : '100000',
1622
+
'help' : 'Maximum number of received bytes per client query',
1623
+
'doc' : '''
1624
+
The maximum number of cumulative bytes that will be accepted during the resolution of a single client query.
if (d_outqueries + d_throttledqueries > s_maxqperq) {
3572
-
throwImmediateServFailException("more than " + std::to_string(s_maxqperq) + " (max-qperq) queries sent or throttled while resolving " + qname.toLogString());
3573
+
throwImmediateServFailException("More than " + std::to_string(s_maxqperq) + " (outgoing.max_qperq) queries sent or throttled while resolving " + qname.toLogString());
3574
+
}
3575
+
if (d_bytesReceived > s_maxbytesperq) {
3576
+
throwImmediateServFailException("More than " + std::to_string(s_maxbytesperq) + " (outgoing.max_bytesperq) bytes received while resolving " + qname.toLogString());
@@ -5936,11 +5972,17 @@ int SyncRes::doResolveAt(NsSet& nameservers, DNSName auth, bool flawedNSSet, con
5936
5972
if (rnameservers.size() > nsLimit) {
5937
5973
int newLimit = static_cast<int>(nsLimit - (rnameservers.size() - nsLimit));
5938
5974
nsLimit = std::max(5, newLimit);
5975
+
LOG("Applying nsLimit " << nsLimit << endl);
5939
5976
}
5940
5977
5978
+
// If multiple NS records resolve to the same IP, we don't want to ask again, so keep track
5979
+
std::set<ComboAddress> visitedAddresses;
5941
5980
for (auto tns = rnameservers.cbegin();; ++tns) {
5942
5981
if (addressQueriesForNS >= nsLimit) {
5943
-
throwImmediateServFailException(std::to_string(nsLimit) + " (adjusted max-ns-address-qperq) or more queries with empty results for NS addresses sent resolving " + qname.toLogString());
5982
+
throwImmediateServFailException(std::to_string(nsLimit) + " (outgoing.max_ns_address_qperq) or more queries with empty results for NS addresses sent resolving " + qname.toLogString());
0 commit comments