mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +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
|
1079. [bug] BIND 8 compatibility: accept bare elements at top
|
||||||
level of sort list treating them as if they were
|
level of sort list treating them as if they were
|
||||||
a single element list. [RT #1963]
|
a single element list. [RT #1963]
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -69,19 +69,28 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
|
|||||||
&matched_elt)) {
|
&matched_elt)) {
|
||||||
if (order_elt != NULL) {
|
if (order_elt != NULL) {
|
||||||
if (order_elt->type ==
|
if (order_elt->type ==
|
||||||
dns_aclelementtype_nestedacl)
|
dns_aclelementtype_nestedacl) {
|
||||||
*argp = order_elt->u.nestedacl;
|
*argp = order_elt->u.nestedacl;
|
||||||
else if (order_elt->type ==
|
return (NS_SORTLISTTYPE_2ELEMENT);
|
||||||
dns_aclelementtype_localhost &&
|
} else if (order_elt->type ==
|
||||||
ns_g_server->aclenv.localhost != NULL)
|
dns_aclelementtype_localhost &&
|
||||||
|
ns_g_server->aclenv.localhost != NULL) {
|
||||||
*argp = ns_g_server->aclenv.localhost;
|
*argp = ns_g_server->aclenv.localhost;
|
||||||
else if (order_elt->type ==
|
return (NS_SORTLISTTYPE_2ELEMENT);
|
||||||
dns_aclelementtype_localnets &&
|
} else if (order_elt->type ==
|
||||||
ns_g_server->aclenv.localnets != NULL)
|
dns_aclelementtype_localnets &&
|
||||||
|
ns_g_server->aclenv.localnets != NULL) {
|
||||||
*argp = ns_g_server->aclenv.localnets;
|
*argp = ns_g_server->aclenv.localnets;
|
||||||
else
|
return (NS_SORTLISTTYPE_2ELEMENT);
|
||||||
goto dont_sort;
|
} else {
|
||||||
return (NS_SORTLISTTYPE_2ELEMENT);
|
/*
|
||||||
|
* 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 {
|
} else {
|
||||||
INSIST(matched_elt != NULL);
|
INSIST(matched_elt != NULL);
|
||||||
*argp = matched_elt;
|
*argp = matched_elt;
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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 {
|
options {
|
||||||
query-source address 10.53.0.1;
|
query-source address 10.53.0.1;
|
||||||
@@ -34,7 +34,9 @@ options {
|
|||||||
!1.1.1.4; !1.1.1.2; !1.1.1.3; !1.1.1.1; // sort these last,
|
!1.1.1.4; !1.1.1.2; !1.1.1.3; !1.1.1.1; // sort these last,
|
||||||
192.168.3/24; // this first
|
192.168.3/24; // this first
|
||||||
{ 192.168.2/24; 192.168.1/24; }; }; }; // and these next
|
{ 192.168.2/24; 192.168.1/24; }; }; }; // and these next
|
||||||
{ { 10.53.0.2; 10.53.0.3; }; }; // Prefer self
|
{ { 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
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# 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=..
|
||||||
. $SYSTEMTESTTOP/conf.sh
|
. $SYSTEMTESTTOP/conf.sh
|
||||||
@@ -38,8 +38,8 @@ $DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd a.example. \
|
|||||||
# result RRs is significant.
|
# result RRs is significant.
|
||||||
diff test1.dig test1.good || status=1
|
diff test1.dig test1.good || status=1
|
||||||
|
|
||||||
echo "I:test 1-element sortlist statement"
|
echo "I:test 1-element sortlist statement and undocumented BIND 8 features"
|
||||||
for n in 2 3
|
for n in 2 3 4 5
|
||||||
do
|
do
|
||||||
cat <<EOF >test2.good
|
cat <<EOF >test2.good
|
||||||
b.example. 300 IN A 10.53.0.$n
|
b.example. 300 IN A 10.53.0.$n
|
||||||
|
Reference in New Issue
Block a user