diff --git a/CHANGES b/CHANGES index efa050b83e..e7c7613c3c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +6032. [bug] After change 5995, zone transfers were using a small + compression context that only had space for the first + few dozen names in each message. They now use a large + compression context with enough space for every name. + [GL #3706] + 6031. [bug] Move the "final reference detached" log message from dns_zone unit to the DEBUG(1) log level. [GL #3707] diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index a036aa9477..59138aee01 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -52,7 +52,6 @@ Bug Fixes 10 to 100 to accomodate for some browsers that send more that 10 headers by default. :gl:`#3670` - - Copy TLS identifier when setting up primaries for catalog member zones. :gl:`#3638` @@ -64,6 +63,10 @@ Bug Fixes :iscman:`named-checkzone` tool from superfluously logging this message in non-debug mode. :gl:`#3707` +- The new name compression code in BIND 9.19.7 was not compressing + names in zone transfers that should have been compressed, so zone + transfers were larger than before. :gl:`#3706` + Known Issues ~~~~~~~~~~~~ diff --git a/lib/dns/include/dns/compress.h b/lib/dns/include/dns/compress.h index b5930617be..2ea37b548e 100644 --- a/lib/dns/include/dns/compress.h +++ b/lib/dns/include/dns/compress.h @@ -58,9 +58,10 @@ ISC_LANG_BEGINDECLS * few dozen names in the hash set. (We can't actually use every slot because * space is reserved for performance reasons.) For large messages, the number * of names is limited by the minimum size of an RR (owner, type, class, ttl, - * length) which is 16 bytes when the owner has a new 3-character label - * before the compressed zone name. Divide the maximum compression offset - * 0x3FFF by 16 and you get roughly 1024. + * length) which is 12 bytes - call it 16 bytes to make space for a new label. + * Divide the maximum compression offset 0x4000 by 16 and you get 0x400 == 1024. + * In practice, the root zone (for example) uses less than 200 distinct names + * per message. */ enum { DNS_COMPRESS_SMALLBITS = 6, diff --git a/lib/ns/xfrout.c b/lib/ns/xfrout.c index 83494a3f5b..5f7984bcdc 100644 --- a/lib/ns/xfrout.c +++ b/lib/ns/xfrout.c @@ -1527,7 +1527,8 @@ sendstream(xfrout_ctx_t *xfr) { if (is_tcp) { isc_region_t used; - dns_compress_init(&cctx, xfr->mctx, DNS_COMPRESS_CASE); + dns_compress_init(&cctx, xfr->mctx, + DNS_COMPRESS_CASE | DNS_COMPRESS_LARGE); cleanup_cctx = true; CHECK(dns_message_renderbegin(msg, &cctx, &xfr->txbuf)); CHECK(dns_message_rendersection(msg, DNS_SECTION_QUESTION, 0));