]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
randomize record order by default, i.e. reorder_RR(true)
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 14 Jan 2021 12:16:06 +0000 (13:16 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 14 Jan 2021 13:18:07 +0000 (14:18 +0100)
It's quite cheap for us, and it might help with dumb clients
overusing the lowest IP from each set.

NEWS
daemon/engine.c
doc/config-answer-reordering.rst

diff --git a/NEWS b/NEWS
index 5b98cdd3ac057685204c0785c06451222953281d..047948b03114a056f6ee07ba27bb45fce45bd591 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Improvements
 - better algorithm for choosing nameservers (!1030)
 - daf module: add daf.clear() (!1114)
 - dnstap module: more features and don't log internal requests (!1103)
+- randomize record order by default, i.e. reorder_RR(true) (!1123)
 
 Bugfixes
 --------
index 749308a542100804fcbf8bd4f2e8a1905f00b5f1..82505b2232d29ede0b964108f22a679607f76ee2 100644 (file)
@@ -379,6 +379,9 @@ static int init_resolver(struct engine *engine)
 {
        /* Note: whole *engine had been zeroed by engine_init(). */
        struct kr_context * const ctx = &engine->resolver;
+       /* Default options (request flags). */
+       ctx->options.REORDER_RR = true;
+
        /* Open resolution context */
        ctx->trust_anchors = map_make(NULL);
        ctx->negative_anchors = map_make(NULL);
index b92cb0241cabfd68828fd137173fa8b359d5cd25..d221a5a3643229e29f908b4ae22abe9baceb8468 100644 (file)
@@ -13,5 +13,5 @@ order of records in DNS answers sent by resolver:
    :return: The (new) value of the option
 
    If set, resolver will vary the order of resource records within RR sets.
-   It is disabled by default.
+   It is enabled by default since 5.3.0.