From 4ad34399ce154173aa09b0b0567f9585bd35c3b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 14 Jan 2021 13:16:06 +0100 Subject: [PATCH] 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. --- NEWS | 1 + daemon/engine.c | 3 +++ doc/config-answer-reordering.rst | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) 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. -- 2.47.2