bind9/lib/dns
Diego Fronza 230d79c191 Fix resolution of unusual ip6.arpa names
Before this commit, BIND was unable to resolve ip6.arpa names like
the one reported in issue #1847 when using query minimization.

As reported in the issue, an attempt to resolve a name like
'rec-test-dom-158937817846788.test123.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.3.4.3.5.4.0.8.2.6.0.1.0.0.2.ip6.arpa'
using default settings would fail.

The reason was that query minimization algorithm in 'fctx_minimize_qname'
would divide any ip6.arpa names in increasing number of labels,
7,11, ... up to 35, thus limiting the destination name (minimized) to a number
of 35 labels.

In case the last query minimization attempt (with 35 labels) would fail with
NXDOMAIN, BIND would attempt the query mininimization again with the exact
same QNAME, limited on the 35 labels, and that in turn would fail again.

This fix avoids this fail loop by considering the extra labels that may appear
in the leftmost part of an ip6.arpa name, those after the IPv6 part.
2020-09-01 15:47:00 -03:00
..
include Address use after free between view, resolver and nta. 2020-08-11 11:00:49 +10:00
rdata Refactor totext_loc 2020-08-26 15:31:31 +02:00
tests Refactor totext_loc 2020-08-26 15:31:31 +02:00
win32 Address use after free between view, resolver and nta. 2020-08-11 11:00:49 +10: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-08-06 09:10:06 +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 Always check the return from isc_refcount_decrement. 2020-07-31 10:15:44 +10: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 Always check the return from isc_refcount_decrement. 2020-07-31 10:15:44 +10: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 Fix time printing in key files 2020-08-07 11:26:09 +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 Get rid of type 'RESERVED0'. 2020-08-13 23:06:55 +10: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 Make 'parent-registration-delay' obsolete 2020-08-07 11:26:09 +02: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 rndc dnssec -checkds set algorithm 2020-08-07 11:26:09 +02: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 Cast the original rcode to (dns_ttl_t) when setting extended rcode 2020-08-25 14:10:05 +00: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 Address use after free between view, resolver and nta. 2020-08-11 11:00:49 +10: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 Fix crash in pk11_numbits() when native-pkcs11 is used 2020-08-05 15:51:29 +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 off-by-one error when calculating new hashtable size 2020-08-28 16:21:21 +02:00
rbtdb.c Use the Fibonacci Hashing for the RBTDB glue table 2020-08-26 21:16:04 +10: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 Fix warnings in when build with --enable-buffer-useinline 2020-08-25 16:02:55 +02: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 resolution of unusual ip6.arpa names 2020-09-01 15:47:00 -03: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 Always check the return from isc_refcount_decrement. 2020-07-31 10:15:44 +10: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 Always check the return from isc_refcount_decrement. 2020-07-31 10:15:44 +10: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 Always check the return from isc_refcount_decrement. 2020-07-31 10:15:44 +10: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 Address use after free between view, resolver and nta. 2020-08-11 11:00:49 +10:00
xfrin.c Verify the question section when transfering in. 2020-06-04 16:10:41 +02:00
zone.c Update managed keys log messages to be less confusing. 2020-08-11 00:10:10 +00: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 Always check the return from isc_refcount_decrement. 2020-07-31 10:15:44 +10:00