From: Vladimír Čunát Date: Thu, 14 Jan 2021 12:16:06 +0000 (+0100) Subject: randomize record order by default, i.e. reorder_RR(true) X-Git-Tag: v5.3.0~20^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ad34399ce154173aa09b0b0567f9585bd35c3b5;p=thirdparty%2Fknot-resolver.git randomize record order by default, i.e. reorder_RR(true) It's quite cheap for us, and it might help with dumb clients overusing the lowest IP from each set. --- diff --git a/NEWS b/NEWS index 5b98cdd3a..047948b03 100644 --- 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 -------- diff --git a/daemon/engine.c b/daemon/engine.c index 749308a54..82505b223 100644 --- a/daemon/engine.c +++ b/daemon/engine.c @@ -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); diff --git a/doc/config-answer-reordering.rst b/doc/config-answer-reordering.rst index b92cb0241..d221a5a36 100644 --- a/doc/config-answer-reordering.rst +++ b/doc/config-answer-reordering.rst @@ -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.