mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 01:59:59 -04:00
789. [bug] The "localhost" and "localnets" ACLs did not match
when used as the second element of a two-element
sortlist item.
This commit is contained in:
parent
eb059776a2
commit
34613b2e39
2 changed files with 14 additions and 3 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,4 +1,8 @@
|
|||
|
||||
789. [bug] The "localhost" and "localnets" ACLs did not match
|
||||
when used as the second element of a two-element
|
||||
sortlist item.
|
||||
|
||||
788. [func] Add the "match-mapped-addresses" option, which
|
||||
causes IPv6 v4mapped addresses to be treated as
|
||||
IPv4 addresses for the purpose of acl matching.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sortlist.c,v 1.4 2001/01/09 21:40:04 bwelling Exp $ */
|
||||
/* $Id: sortlist.c,v 1.5 2001/03/26 23:36:00 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -62,9 +62,16 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
|
|||
&matchelt)) {
|
||||
if (inner->length == 2) {
|
||||
dns_aclelement_t *elt1 = &inner->elements[1];
|
||||
if (elt1->type != dns_aclelementtype_nestedacl)
|
||||
if (elt1->type == dns_aclelementtype_nestedacl)
|
||||
*argp = elt1->u.nestedacl;
|
||||
else if (elt1->type == dns_aclelementtype_localhost &&
|
||||
ns_g_server->aclenv.localhost != NULL)
|
||||
*argp = ns_g_server->aclenv.localhost;
|
||||
else if (elt1->type == dns_aclelementtype_localnets &&
|
||||
ns_g_server->aclenv.localnets != NULL)
|
||||
*argp = ns_g_server->aclenv.localnets;
|
||||
else
|
||||
goto dont_sort;
|
||||
*argp = elt1->u.nestedacl;
|
||||
return (NS_SORTLISTTYPE_2ELEMENT);
|
||||
} else {
|
||||
INSIST(matchelt != NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue