]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Merge branch 'restart_conf' of https://github.com/cgallred/unbound into cgallred...
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Tue, 13 Dec 2022 13:35:01 +0000 (14:35 +0100)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Tue, 13 Dec 2022 13:35:01 +0000 (14:35 +0100)
1  2 
doc/unbound.conf.5.in
iterator/iter_utils.c
iterator/iterator.c
iterator/iterator.h
util/config_file.c
util/config_file.h
util/configlexer.lex
util/configparser.y

index 08c13e898206b3454aadb3b42e9964c0131b651b,3397d706a02afc83eccba0d6693e7226264a34cb..2dd855c51d15648e03af9518c951594c4e37e58f
@@@ -1821,19 -1752,10 +1821,26 @@@ set ip\-ratelimit to a suspicious rate 
  traffic.  Default is off.
  .TP 5
  .B outbound\-msg\-retry: \fI<number>
 -The number of retries Unbound will do in case of a non positive response is
 -received. If a forward nameserver is used, this is the number of retries per
 -forward nameserver in case of throwaway response.
 +The number of retries, per upstream nameserver in a delegation, that Unbound
 +will attempt in case a throwaway response is received.
 +No response (timeout) contributes to the retry counter.
 +If a forward/stub zone is used, this is the number of retries per nameserver in
 +the zone.
 +Default is 5.
 +.TP 5
 +.B max\-sent\-count: \fI<number>
 +Hard limit on the number of outgoing queries Unbound will make while resolving
 +a name, making sure large NS sets do not loop.
 +It resets on query restarts (e.g., CNAME) and referrals.
 +Default is 32.
 +.TP 5
++.B max\-query\-restarts: \fI<number>
++Set the maximum number of times a query is allowed to restart upon encountering
++a CNAME record.
++If a query encounters more than the specified number of CNAME
++records before resolving, Unbound will reply with SERVFAIL.
++Default is 11.
+ .TP 5
  .B fast\-server\-permil: \fI<number>
  Specify how many times out of 1000 to pick from the set of fastest servers.
  0 turns the feature off.  A value of 900 would pick from the fastest
@@@ -1859,20 -1781,10 +1866,20 @@@ EDNS0 option code for the \fIedns\-clie
  A value from the `Reserved for Local/Experimental` range (65001-65534) should
  be used.  Default is 65001.
  .TP 5
 -.B max\-query\-restarts: \fI<number>
 -Set the maximum number of times a query is allowed to restart upon encountering
 -a CNAME record. If a query encounters more than the specified number of CNAME
 -records before resolving, unbound will reply with SERVFAIL. Default is 8.
 +.B ede: \fI<yes or no>
 +If enabled, Unbound will respond with Extended DNS Error codes (RFC8914).
 +These EDEs attach informative error messages to a response for various
 +errors. Default is "no".
 +
 +When the \fBval-log-level\fR option is also set to \fB2\fR, responses with
 +Extended DNS Errors concerning DNSSEC failures that are not served from cache,
 +will also contain a descriptive text message about the reason for the failure.
- .TP
++.TP 5
 +.B ede\-serve\-expired: \fI<yes or no>
 +If enabled, Unbound will attach an Extended DNS Error (RFC8914) Code 3 - Stale
 +Answer as EDNS0 option to the expired response. Note that this will not attach
 +the EDE code without setting the global \fBede\fR option to "yes" as well.
 +Default is "no".
  .SS "Remote Control Options"
  In the
  .B remote\-control:
index b17b6ef8687a7af164b1ace1f77a0db3130e20e5,5c811c6d3d2203aa13d62fb9e74e98125bd0ea37..b2a2309ab4b14ac6aedeb22fc91d43edf78f77a3
@@@ -174,8 -176,9 +174,9 @@@ iter_apply_cfg(struct iter_env* iter_en
        }
        iter_env->supports_ipv6 = cfg->do_ip6;
        iter_env->supports_ipv4 = cfg->do_ip4;
 -      iter_env->max_query_restarts = cfg->max_query_restarts;
        iter_env->outbound_msg_retry = cfg->outbound_msg_retry;
 -
 +      iter_env->max_sent_count = cfg->max_sent_count;
++      iter_env->max_query_restarts = cfg->max_query_restarts;
        return 1;
  }
  
Simple merge
index 8175ec12eae3996e52a99ca0cd685f94309a99b5,57d06ef8aa89f2270855042cfdcfe2d2954d807c..3118e65b497044d7bc9ce7866b7181fc6dca2c9f
@@@ -141,11 -138,10 +141,13 @@@ struct iter_env 
        /** number of queries that have been ratelimited */
        size_t num_queries_ratelimited;
  
+       /** max number of query restarts to limit length of CNAME chain */
+       size_t max_query_restarts;
        /** number of retries on outgoing queries */
        int outbound_msg_retry;
 +
 +      /** number of queries_sent */
 +      int max_sent_count;
  };
  
  /**
index 7f97a4f210ac6eccba8b3a29205988cd41d1612e,ef6ecf63ebac7de6dde467732c5b7fc5a0699150..b6f16a587a173224535cccfb7d8e65636574ff02
@@@ -781,7 -767,6 +782,8 @@@ int config_set_option(struct config_fil
        else S_YNO("ip-ratelimit-backoff:", ip_ratelimit_backoff)
        else S_YNO("ratelimit-backoff:", ratelimit_backoff)
        else S_NUMBER_NONZERO("outbound-msg-retry:", outbound_msg_retry)
 +      else S_NUMBER_NONZERO("max-sent-count", max_sent_count)
++      else S_SIZET_NONZERO("max-query-restarts:", max_query_restarts)
        else S_SIZET_NONZERO("fast-server-num:", fast_server_num)
        else S_NUMBER_OR_ZERO("fast-server-permil:", fast_server_permil)
        else S_YNO("qname-minimisation:", qname_minimisation)
@@@ -1243,7 -1223,6 +1245,8 @@@ config_get_option(struct config_file* c
        else O_YNO(opt, "ip-ratelimit-backoff", ip_ratelimit_backoff)
        else O_YNO(opt, "ratelimit-backoff", ratelimit_backoff)
        else O_UNS(opt, "outbound-msg-retry", outbound_msg_retry)
 +      else O_UNS(opt, "max-sent-count", max_sent_count)
++      else O_DEC(opt, "max-query-restarts", max_query_restarts)
        else O_DEC(opt, "fast-server-num", fast_server_num)
        else O_DEC(opt, "fast-server-permil", fast_server_permil)
        else O_DEC(opt, "val-sig-skew-min", val_sig_skew_min)
Simple merge
Simple merge
Simple merge