2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Check for edns1 and strict decompression once and for all in

dns_[de]compress_setmethods instead of separately in every caller
This commit is contained in:
Andreas Gustafsson
2000-05-04 22:19:34 +00:00
parent fd63a046d6
commit 94a08e09db
30 changed files with 88 additions and 266 deletions

View File

@@ -280,11 +280,6 @@ dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
INSIST(dns_rdataset_next(rdataset) == ISC_R_NOMORE);
isc_buffer_init(&source, rdata.data, rdata.length);
isc_buffer_add(&source, rdata.length);
if (dns_compress_getedns(cctx) >= 1)
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL);
else
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
savedbuffer = *target;
@@ -320,6 +315,7 @@ dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
/*
* Write the name.
*/
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
result = dns_name_towire(&name, cctx, target);
if (result != ISC_R_SUCCESS)
goto rollback;