From: Michał Kępień Date: Fri, 2 Oct 2020 06:41:43 +0000 (+0200) Subject: Allow "order none" in "rrset-order" rules X-Git-Tag: v9.17.6~18^2~3 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=dbcf683c1a57f49876e329fca183cb39d20ca3a4;p=thirdparty%2Fbind9.git Allow "order none" in "rrset-order" rules named-checkconf treats the following configuration as valid: options { rrset-order { order none; }; }; Yet, the above configuration causes named to crash on startup with: order.c:74: REQUIRE(mode == 0x00000800 || mode == 0x00000400 || mode == 0x00800000) failed, back trace Add DNS_RDATASETATTR_NONE to the list of RRset ordering modes accepted by dns_order_add() to allow "order none" to be used in "rrset-order" rules. This both prevents the aforementioned crashes and addresses the discrepancy between named-checkconf and named. --- diff --git a/lib/dns/order.c b/lib/dns/order.c index 463df94d01c..fbd1c9f6dad 100644 --- a/lib/dns/order.c +++ b/lib/dns/order.c @@ -73,7 +73,8 @@ dns_order_add(dns_order_t *order, const dns_name_t *name, REQUIRE(DNS_ORDER_VALID(order)); REQUIRE(mode == DNS_RDATASETATTR_RANDOMIZE || mode == DNS_RDATASETATTR_FIXEDORDER || - mode == DNS_RDATASETATTR_CYCLIC); + mode == DNS_RDATASETATTR_CYCLIC || + mode == DNS_RDATASETATTR_NONE); ent = isc_mem_get(order->mctx, sizeof(*ent));