mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
1732. [bug] 'rrset-order name "*"' wasn't being applied to ".".
[RT #12467]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -13,7 +13,8 @@
|
|||||||
1733. [bug] Return non-zero exit status on initial load failure.
|
1733. [bug] Return non-zero exit status on initial load failure.
|
||||||
[RT #12658]
|
[RT #12658]
|
||||||
|
|
||||||
1732. [placeholder] rt12467
|
1732. [bug] 'rrset-order name "*"' wasn't being applied to ".".
|
||||||
|
[RT #12467]
|
||||||
|
|
||||||
1731. [port] darwin: relax version test in ifconfig.sh.
|
1731. [port] darwin: relax version test in ifconfig.sh.
|
||||||
[RT #12581]
|
[RT #12581]
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: server.c,v 1.429 2004/09/29 06:45:37 marka Exp $ */
|
/* $Id: server.c,v 1.430 2004/10/05 04:38:17 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -522,6 +522,7 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
|
|||||||
const char *str;
|
const char *str;
|
||||||
isc_buffer_t b;
|
isc_buffer_t b;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
isc_boolean_t addroot;
|
||||||
|
|
||||||
result = ns_config_getclass(cfg_tuple_get(ent, "class"),
|
result = ns_config_getclass(cfg_tuple_get(ent, "class"),
|
||||||
dns_rdataclass_any, &rdclass);
|
dns_rdataclass_any, &rdclass);
|
||||||
@@ -538,11 +539,12 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
|
|||||||
str = cfg_obj_asstring(obj);
|
str = cfg_obj_asstring(obj);
|
||||||
else
|
else
|
||||||
str = "*";
|
str = "*";
|
||||||
|
addroot = ISC_TF(strcmp(str, "*") == 0);
|
||||||
isc_buffer_init(&b, str, strlen(str));
|
isc_buffer_init(&b, str, strlen(str));
|
||||||
isc_buffer_add(&b, strlen(str));
|
isc_buffer_add(&b, strlen(str));
|
||||||
dns_fixedname_init(&fixed);
|
dns_fixedname_init(&fixed);
|
||||||
result = dns_name_fromtext(dns_fixedname_name(&fixed), &b,
|
result = dns_name_fromtext(dns_fixedname_name(&fixed), &b,
|
||||||
dns_rootname, ISC_FALSE, NULL);
|
dns_rootname, ISC_FALSE, NULL);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
|
|
||||||
@@ -558,6 +560,18 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
|
|||||||
else
|
else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "*" should match everything including the root (BIND 8 compat).
|
||||||
|
* As dns_name_matcheswildcard(".", "*.") returns FALSE add a
|
||||||
|
* explict entry for "." when the name is "*".
|
||||||
|
*/
|
||||||
|
if (addroot) {
|
||||||
|
result = dns_order_add(order, dns_rootname,
|
||||||
|
rdtype, rdclass, mode);
|
||||||
|
if (result != ISC_R_SUCCESS)
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
return (dns_order_add(order, dns_fixedname_name(&fixed),
|
return (dns_order_add(order, dns_fixedname_name(&fixed),
|
||||||
rdtype, rdclass, mode));
|
rdtype, rdclass, mode));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user