bind9/lib/dns
Diego Fronza c2928c2ed4 Fix rpz wildcard name matching
Whenever an exact match is found by dns_rbt_findnode(),
the highest level node in the chain will not be put into
chain->levels[] array, but instead the chain->end
pointer will be adjusted to point to that node.

Suppose we have the following entries in a rpz zone:
example.com     CNAME rpz-passthru.
*.example.com   CNAME rpz-passthru.

A query for www.example.com would result in the
following chain object returned by dns_rbt_findnode():

chain->level_count = 2
chain->level_matches = 2
chain->levels[0] = .
chain->levels[1] = example.com
chain->levels[2] = NULL
chain->end = www

Since exact matches only care for testing rpz set bits,
we need to test for rpz wild bits through iterating the nodechain, and
that includes testing the rpz wild bits in the highest level node found.

In the case of an exact match, chain->levels[chain->level_matches]
will be NULL, to address that we must use chain->end as the start point,
then iterate over the remaining levels in the chain.
2020-07-24 11:34:40 -07:00
..
include Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
rdata Check walking the hip rendezvous servers. 2020-07-24 04:15:56 +00:00
tests Check walking the hip rendezvous servers. 2020-07-24 04:15:56 +00:00
win32 Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c apply the modified style 2020-02-13 15:05:06 -08:00
adb.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
api Update library API versions 2020-07-15 22:54:13 +02:00
badcache.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
byaddr.c apply the modified style 2020-02-13 15:05:06 -08:00
cache.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
callbacks.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
catz.c change "expr == false" to "!expr" in conditionals 2020-05-25 16:09:57 -07:00
client.c remove redundant rctx != NULL check 2020-07-05 23:52:19 +00:00
clientinfo.c apply the modified style 2020-02-13 15:05:06 -08:00
compress.c change 'expr == true' to 'expr' in conditionals 2020-05-25 16:09:57 -07:00
db.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
dbiterator.c apply the modified style 2020-02-13 15:05:06 -08:00
dbtable.c apply the modified style 2020-02-13 15:05:06 -08:00
diff.c apply the modified style 2020-02-13 15:05:06 -08:00
dispatch.c change 'expr == true' to 'expr' in conditionals 2020-05-25 16:09:57 -07:00
dlz.c apply the modified style 2020-02-13 15:05:06 -08:00
dns64.c apply the modified style 2020-02-13 15:05:06 -08:00
dnsrps.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
dnssec.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dnstap.c Fix rndc dnstap -roll N 2020-06-23 20:20:39 +10:00
dnstap.proto fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
ds.c Stop leaking OpenSSL types and defines in the isc/md.h 2020-03-17 09:11:13 +01:00
dst_api.c Move dst key printtime in separate function 2020-06-30 09:51:04 +02:00
dst_internal.h Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
dst_openssl.h Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dst_parse.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dst_parse.h Reformat using the new rules 2020-02-14 09:31:05 +01:00
dst_pkcs11.h Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
dst_result.c apply the modified style 2020-02-13 15:05:06 -08:00
dyndb.c change 'expr == true' to 'expr' in conditionals 2020-05-25 16:09:57 -07:00
ecs.c apply the modified style 2020-02-13 15:05:06 -08:00
fixedname.c apply the modified style 2020-02-13 15:05:06 -08:00
forward.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
gen-unix.h Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
gen-win32.h Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
gen.c replace fputs() with fprintf() 2020-05-04 09:14:58 +02:00
geoip2.c Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
gssapi_link.c Restore the GSSAPI compilation on Windows (but we should really switch to SSPI/Kerberos) 2020-05-28 08:07:57 +02:00
gssapictx.c Only call gsskrb5_register_acceptor_identity if we have gssapi_krb5.h. 2020-07-14 08:55:13 +10:00
hmac_link.c Stop leaking OpenSSL types and defines in the isc/md.h 2020-03-17 09:11:13 +01:00
ipkeylist.c apply the modified style 2020-02-13 15:05:06 -08:00
iptable.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
journal.c dns_journal_iter_init() can now return the size of the delta 2020-03-05 17:20:16 -08:00
kasp.c Fix race condition dnssec-policy with views 2020-03-09 14:48:17 +01:00
key.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
keydata.c apply the modified style 2020-02-13 15:05:06 -08:00
keymgr.c Check return value of dst_key_getbool() 2020-07-14 12:53:54 +00:00
keytable.c The dsset returned by dns_keynode_dsset needs to be thread safe. 2020-06-11 16:02:09 +10:00
lib.c change "expr == false" to "!expr" in conditionals 2020-05-25 16:09:57 -07:00
log.c Added new logging category rpz-passthru 2020-05-07 11:44:48 -03:00
lookup.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
Makefile.am Fix "make dist" 2020-06-05 13:19:49 +02:00
master.c Reject primary zones with an DS record at the zone apex. 2020-06-04 16:00:33 +02:00
masterdump.c change "expr == false" to "!expr" in conditionals 2020-05-25 16:09:57 -07:00
message.c Add +yaml support for EDE 2020-06-05 08:34:51 +10:00
name.c Change the dns_name hashing to use 32-bit values 2020-07-21 08:44:26 +02:00
ncache.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
nsec.c apply the modified style 2020-02-13 15:05:06 -08:00
nsec3.c apply the modified style 2020-02-13 15:05:06 -08:00
nta.c list "validate-except" entries in "rndc nta -d" and "rndc secroots" 2020-03-04 00:44:32 -08:00
openssl_link.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
openssldh_link.c Remove unnecessary forward declarations. 2020-04-20 11:40:41 +02:00
opensslecdsa_link.c Add initial support for ECDSA keys via OpenSSL PKCS#11 engine 2020-05-01 10:36:45 +02:00
openssleddsa_link.c Add engine support to OpenSSL EdDSA implementation. 2020-05-01 14:11:08 +02:00
opensslrsa_link.c Simplify error handling 2020-05-01 10:36:45 +02:00
order.c apply the modified style 2020-02-13 15:05:06 -08:00
peer.c Move structure declarations from dns/peer.h into peer.c 2020-04-20 08:59:09 +00:00
pkcs11.c Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
pkcs11ecdsa_link.c Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
pkcs11eddsa_link.c Update EdDSA implementation to PKCS#11 v3.0. 2020-04-30 18:40:45 +02:00
pkcs11rsa_link.c Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
portlist.c apply the modified style 2020-02-13 15:05:06 -08:00
private.c apply the modified style 2020-02-13 15:05:06 -08:00
rbt.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
rbtdb.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
rbtdb.h Use clang-tidy to add curly braces around one-line statements 2020-02-13 22:07:21 +01:00
rcode.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
rdata.c Adjust range limit of unknown meta types 2020-07-08 02:04:16 +00:00
rdatalist.c apply the modified style 2020-02-13 15:05:06 -08:00
rdatalist_p.h Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
rdataset.c apply the modified style 2020-02-13 15:05:06 -08:00
rdatasetiter.c apply the modified style 2020-02-13 15:05:06 -08:00
rdataslab.c improve calculation of database transfer size 2020-03-05 17:20:16 -08:00
request.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
resolver.c Fix assertion failure during startup when the server is under load. 2020-07-01 12:25:36 +02:00
result.c Reject primary zones with an DS record at the zone apex. 2020-06-04 16:00:33 +02:00
rootns.c adjust the clang-format penalties to reduce string breaking 2020-02-17 14:23:58 -08:00
rpz.c Fix rpz wildcard name matching 2020-07-24 11:34:40 -07:00
rriterator.c apply the modified style 2020-02-13 15:05:06 -08:00
rrl.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
sdb.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
sdlz.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
soa.c apply the modified style 2020-02-13 15:05:06 -08:00
ssu.c enforce record count maximums 2020-05-13 15:35:28 +10:00
ssu_external.c Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
stats.c Replace hard coded value with constant 2020-04-03 09:27:15 +02:00
tcpmsg.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
time.c apply the modified style 2020-02-13 15:05:06 -08:00
timer.c apply the modified style 2020-02-13 15:05:06 -08:00
tkey.c change 'expr == true' to 'expr' in conditionals 2020-05-25 16:09:57 -07:00
tsec.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
tsig.c change "expr == false" to "!expr" in conditionals 2020-05-25 16:09:57 -07:00
tsig_p.h Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
ttl.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
update.c Remove now redundant check for state != NULL 2020-06-25 12:04:36 +10:00
validator.c The validator could fail when select_signing_key/get_dst_key failed 2020-06-25 13:43:45 +02:00
view.c Fix the rbt hashtable and grow it when setting max-cache-size 2020-07-21 08:44:26 +02:00
xfrin.c Verify the question section when transfering in. 2020-06-04 16:10:41 +02:00
zone.c add "primaries" as a synonym for "masters" in named.conf 2020-07-01 11:11:34 -07:00
zone_p.h Reformat using the new rules 2020-02-14 09:31:05 +01:00
zonekey.c apply the modified style 2020-02-13 15:05:06 -08:00
zoneverify.c The dsset returned by dns_keynode_dsset needs to be thread safe. 2020-06-11 16:02:09 +10:00
zt.c Reformat using the new rules 2020-02-14 09:31:05 +01:00