mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
1080. [bug] BIND 8 compatibility: accept bare IP prefixes
as the second element of a two-element top level sort list statement. [RT #1964]
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,3 +1,7 @@
|
||||
1080. [bug] BIND 8 compatibility: accept bare IP prefixes
|
||||
as the second element of a two-element top level
|
||||
sort list statement. [RT #1964]
|
||||
|
||||
1079. [bug] BIND 8 compatibility: accept bare elements at top
|
||||
level of sort list treating them as if they were
|
||||
a single element list. [RT #1963]
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sortlist.c,v 1.7 2001/10/30 19:45:33 gson Exp $ */
|
||||
/* $Id: sortlist.c,v 1.8 2001/10/30 20:19:32 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -69,19 +69,28 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
|
||||
&matched_elt)) {
|
||||
if (order_elt != NULL) {
|
||||
if (order_elt->type ==
|
||||
dns_aclelementtype_nestedacl)
|
||||
dns_aclelementtype_nestedacl) {
|
||||
*argp = order_elt->u.nestedacl;
|
||||
else if (order_elt->type ==
|
||||
dns_aclelementtype_localhost &&
|
||||
ns_g_server->aclenv.localhost != NULL)
|
||||
*argp = ns_g_server->aclenv.localhost;
|
||||
else if (order_elt->type ==
|
||||
dns_aclelementtype_localnets &&
|
||||
ns_g_server->aclenv.localnets != NULL)
|
||||
*argp = ns_g_server->aclenv.localnets;
|
||||
else
|
||||
goto dont_sort;
|
||||
return (NS_SORTLISTTYPE_2ELEMENT);
|
||||
} else if (order_elt->type ==
|
||||
dns_aclelementtype_localhost &&
|
||||
ns_g_server->aclenv.localhost != NULL) {
|
||||
*argp = ns_g_server->aclenv.localhost;
|
||||
return (NS_SORTLISTTYPE_2ELEMENT);
|
||||
} else if (order_elt->type ==
|
||||
dns_aclelementtype_localnets &&
|
||||
ns_g_server->aclenv.localnets != NULL) {
|
||||
*argp = ns_g_server->aclenv.localnets;
|
||||
return (NS_SORTLISTTYPE_2ELEMENT);
|
||||
} else {
|
||||
/*
|
||||
* BIND 8 allows a bare IP prefix as
|
||||
* the 2nd element of a 2-element
|
||||
* sortlist statement.
|
||||
*/
|
||||
*argp = order_elt;
|
||||
return (NS_SORTLISTTYPE_1ELEMENT);
|
||||
}
|
||||
} else {
|
||||
INSIST(matched_elt != NULL);
|
||||
*argp = matched_elt;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named.conf,v 1.5 2001/01/09 21:44:40 bwelling Exp $ */
|
||||
/* $Id: named.conf,v 1.6 2001/10/30 20:19:34 gson Exp $ */
|
||||
|
||||
options {
|
||||
query-source address 10.53.0.1;
|
||||
@@ -35,6 +35,8 @@ options {
|
||||
192.168.3/24; // this first
|
||||
{ 192.168.2/24; 192.168.1/24; }; }; }; // and these next
|
||||
{ { 10.53.0.2; 10.53.0.3; }; }; // Prefer self
|
||||
10.53.0.4; // BIND 8 compat
|
||||
{ 10.53.0.5; 10.53.0.5; }; // BIND 8 compat
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: tests.sh,v 1.4 2001/01/13 00:02:55 gson Exp $
|
||||
# $Id: tests.sh,v 1.5 2001/10/30 20:19:33 gson Exp $
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
@@ -38,8 +38,8 @@ $DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd a.example. \
|
||||
# result RRs is significant.
|
||||
diff test1.dig test1.good || status=1
|
||||
|
||||
echo "I:test 1-element sortlist statement"
|
||||
for n in 2 3
|
||||
echo "I:test 1-element sortlist statement and undocumented BIND 8 features"
|
||||
for n in 2 3 4 5
|
||||
do
|
||||
cat <<EOF >test2.good
|
||||
b.example. 300 IN A 10.53.0.$n
|
||||
|
Reference in New Issue
Block a user