mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
Add decompression.
This commit is contained in:
parent
1783fac3a1
commit
1ef8965366
@ -69,7 +69,6 @@ dns_result_t printmessage(dns_message_t *message);
|
|||||||
void
|
void
|
||||||
dump_packet(unsigned char *buf, u_int len)
|
dump_packet(unsigned char *buf, u_int len)
|
||||||
{
|
{
|
||||||
extern dns_decompress_t dctx;
|
|
||||||
extern unsigned int rdcount, rlcount, ncount;
|
extern unsigned int rdcount, rlcount, ncount;
|
||||||
char t[5000]; /* XXX */
|
char t[5000]; /* XXX */
|
||||||
dns_message_t message;
|
dns_message_t message;
|
||||||
@ -81,9 +80,6 @@ dump_packet(unsigned char *buf, u_int len)
|
|||||||
rlcount = 0;
|
rlcount = 0;
|
||||||
ncount = 0;
|
ncount = 0;
|
||||||
|
|
||||||
dctx.allowed = DNS_COMPRESS_GLOBAL14;
|
|
||||||
dns_name_init(&dctx.owner_name, NULL);
|
|
||||||
|
|
||||||
for (i = 0 ; i < len ; /* */ ) {
|
for (i = 0 ; i < len ; /* */ ) {
|
||||||
fprintf(stdout, "%02x", buf[i]);
|
fprintf(stdout, "%02x", buf[i]);
|
||||||
if ((++i % 20) == 0)
|
if ((++i % 20) == 0)
|
||||||
@ -153,9 +149,7 @@ resolve_packet(dns_db_t *db, isc_buffer_t *source, isc_buffer_t *target)
|
|||||||
INSIST(message.aucount == 0);
|
INSIST(message.aucount == 0);
|
||||||
INSIST(message.adcount == 0);
|
INSIST(message.adcount == 0);
|
||||||
|
|
||||||
dctx.allowed = DNS_COMPRESS_GLOBAL14;
|
dns_decompress_init(&dctx, -1, ISC_FALSE);
|
||||||
dns_name_init(&dctx.owner_name, NULL);
|
|
||||||
|
|
||||||
result = dns_compress_init(&cctx, -1, db->mctx);
|
result = dns_compress_init(&cctx, -1, db->mctx);
|
||||||
if (result != DNS_R_SUCCESS)
|
if (result != DNS_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
@ -167,6 +161,10 @@ resolve_packet(dns_db_t *db, isc_buffer_t *source, isc_buffer_t *target)
|
|||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
isc_buffer_remaining(source, &r);
|
isc_buffer_remaining(source, &r);
|
||||||
isc_buffer_setactive(source, r.length);
|
isc_buffer_setactive(source, r.length);
|
||||||
|
if (!dns_decompress_strict(&dctx))
|
||||||
|
dns_decompress_setmethods(&dctx, DNS_COMPRESS_GLOBAL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(&dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
result = dns_name_fromwire(&name, source, &dctx, ISC_FALSE, &tbuf);
|
result = dns_name_fromwire(&name, source, &dctx, ISC_FALSE, &tbuf);
|
||||||
qtype = getshort(source);
|
qtype = getshort(source);
|
||||||
qclass = getshort(source);
|
qclass = getshort(source);
|
||||||
|
@ -12,3 +12,4 @@ rdata_test
|
|||||||
master_test
|
master_test
|
||||||
rbt_test
|
rbt_test
|
||||||
db_test
|
db_test
|
||||||
|
compress_test
|
||||||
|
@ -27,7 +27,8 @@ TARGETS = lex_test \
|
|||||||
rwlock_test \
|
rwlock_test \
|
||||||
wire_test \
|
wire_test \
|
||||||
master_test \
|
master_test \
|
||||||
db_test
|
db_test \
|
||||||
|
compress_test
|
||||||
|
|
||||||
@BIND9_MAKE_RULES@
|
@BIND9_MAKE_RULES@
|
||||||
|
|
||||||
@ -67,5 +68,8 @@ master_test: master_test.o ../../lib/isc/libisc.a ../../lib/dns/libdns.a
|
|||||||
db_test: db_test.o ../../lib/isc/libisc.a ../../lib/dns/libdns.a
|
db_test: db_test.o ../../lib/isc/libisc.a ../../lib/dns/libdns.a
|
||||||
${CC} -o $@ db_test.o ${LIBS}
|
${CC} -o $@ db_test.o ${LIBS}
|
||||||
|
|
||||||
|
compress_test: compress_test.o ../../lib/isc/libisc.a ../../lib/dns/libdns.a
|
||||||
|
${CC} -o $@ compress_test.o ${LIBS}
|
||||||
|
|
||||||
clean distclean::
|
clean distclean::
|
||||||
rm -f ${TARGETS}
|
rm -f ${TARGETS}
|
||||||
|
171
bin/tests/compress_test.c
Normal file
171
bin/tests/compress_test.c
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <isc/assertions.h>
|
||||||
|
#include <isc/error.h>
|
||||||
|
#include <dns/compress.h>
|
||||||
|
#include <dns/name.h>
|
||||||
|
|
||||||
|
unsigned char plain1[] = "\003foo";
|
||||||
|
unsigned char plain2[] = "\003bar\003foo";
|
||||||
|
unsigned char plain3[] = "\003xxx\003bar\003foo";
|
||||||
|
unsigned char plain[] =
|
||||||
|
"\003foo\0\003bar\003foo\0\003bar\003foo\0\003xxx\003bar\003foo";
|
||||||
|
|
||||||
|
unsigned char bit1[] = "\101\010b";
|
||||||
|
unsigned char bit2[] = "\101\014b\260";
|
||||||
|
unsigned char bit3[] = "\101\020b\264";
|
||||||
|
unsigned char bit[] = "\101\010b\0\101\014b\260\0\101\014b\260\0\101\020b\264";
|
||||||
|
|
||||||
|
int raw = 0;
|
||||||
|
|
||||||
|
void test(unsigned int, dns_name_t *, dns_name_t *, dns_name_t *,
|
||||||
|
unsigned char *, unsigned int);
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[]) {
|
||||||
|
dns_name_t name1;
|
||||||
|
dns_name_t name2;
|
||||||
|
dns_name_t name3;
|
||||||
|
isc_region_t region;
|
||||||
|
int c;
|
||||||
|
|
||||||
|
while ((c = getopt(argc, argv, "r")) != -1) {
|
||||||
|
switch (c) {
|
||||||
|
case 'r':
|
||||||
|
raw++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dns_name_init(&name1, NULL);
|
||||||
|
region.base = plain1;
|
||||||
|
region.length = sizeof plain1;
|
||||||
|
dns_name_fromregion(&name1, ®ion);
|
||||||
|
|
||||||
|
dns_name_init(&name2, NULL);
|
||||||
|
region.base = plain2;
|
||||||
|
region.length = sizeof plain2;
|
||||||
|
dns_name_fromregion(&name2, ®ion);
|
||||||
|
|
||||||
|
dns_name_init(&name3, NULL);
|
||||||
|
region.base = plain3;
|
||||||
|
region.length = sizeof plain3;
|
||||||
|
dns_name_fromregion(&name3, ®ion);
|
||||||
|
|
||||||
|
test(DNS_COMPRESS_NONE, &name1, &name2, &name3, plain, sizeof plain);
|
||||||
|
test(DNS_COMPRESS_GLOBAL14, &name1, &name2, &name3, plain,
|
||||||
|
sizeof plain);
|
||||||
|
test(DNS_COMPRESS_GLOBAL, &name1, &name2, &name3, plain, sizeof plain);
|
||||||
|
test(DNS_COMPRESS_LOCAL, &name1, &name2, &name3, plain, sizeof plain);
|
||||||
|
test(DNS_COMPRESS_ALL, &name1, &name2, &name3, plain, sizeof plain);
|
||||||
|
|
||||||
|
dns_name_init(&name1, NULL);
|
||||||
|
region.base = bit1;
|
||||||
|
region.length = sizeof bit1;
|
||||||
|
dns_name_fromregion(&name1, ®ion);
|
||||||
|
|
||||||
|
dns_name_init(&name2, NULL);
|
||||||
|
region.base = bit2;
|
||||||
|
region.length = sizeof bit2;
|
||||||
|
dns_name_fromregion(&name2, ®ion);
|
||||||
|
|
||||||
|
dns_name_init(&name3, NULL);
|
||||||
|
region.base = bit3;
|
||||||
|
region.length = sizeof bit3;
|
||||||
|
dns_name_fromregion(&name3, ®ion);
|
||||||
|
|
||||||
|
test(DNS_COMPRESS_NONE, &name1, &name2, &name3, bit, sizeof bit);
|
||||||
|
test(DNS_COMPRESS_GLOBAL14, &name1, &name2, &name3, bit, sizeof bit);
|
||||||
|
test(DNS_COMPRESS_GLOBAL, &name1, &name2, &name3, bit, sizeof bit);
|
||||||
|
test(DNS_COMPRESS_LOCAL, &name1, &name2, &name3, bit, sizeof bit);
|
||||||
|
test(DNS_COMPRESS_ALL, &name1, &name2, &name3, bit, sizeof bit);
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
|
||||||
|
dns_name_t *name3, unsigned char *result, unsigned int length)
|
||||||
|
{
|
||||||
|
isc_mem_t *mctx = NULL;
|
||||||
|
dns_compress_t cctx;
|
||||||
|
dns_decompress_t dctx;
|
||||||
|
isc_buffer_t source;
|
||||||
|
isc_buffer_t target;
|
||||||
|
dns_name_t name;
|
||||||
|
unsigned char buf1[1024];
|
||||||
|
unsigned char buf2[1024];
|
||||||
|
|
||||||
|
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||||
|
isc_buffer_init(&source, buf1, sizeof buf1, ISC_BUFFERTYPE_BINARY);
|
||||||
|
RUNTIME_CHECK(dns_compress_init(&cctx, -1, mctx) == DNS_R_SUCCESS);
|
||||||
|
|
||||||
|
RUNTIME_CHECK(dns_name_towire(name1, &cctx, &source) == DNS_R_SUCCESS);
|
||||||
|
|
||||||
|
RUNTIME_CHECK(dns_compress_localinit(&cctx, name1, &source) ==
|
||||||
|
DNS_R_SUCCESS);
|
||||||
|
dns_compress_setmethods(&cctx, allowed);
|
||||||
|
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == DNS_R_SUCCESS);
|
||||||
|
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == DNS_R_SUCCESS);
|
||||||
|
RUNTIME_CHECK(dns_name_towire(name3, &cctx, &source) == DNS_R_SUCCESS);
|
||||||
|
|
||||||
|
dns_compress_localinvalidate(&cctx);
|
||||||
|
dns_compress_invalidate(&cctx);
|
||||||
|
|
||||||
|
if (raw) {
|
||||||
|
unsigned int i;
|
||||||
|
for (i = 0 ; i < source.used ; /* */ ) {
|
||||||
|
fprintf(stdout, "%02x",
|
||||||
|
((unsigned char *)source.base)[i]);
|
||||||
|
if ((++i % 20) == 0)
|
||||||
|
fputs("\n", stdout);
|
||||||
|
else
|
||||||
|
if (i == source.used)
|
||||||
|
fputs("\n", stdout);
|
||||||
|
else
|
||||||
|
fputs(" ", stdout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isc_buffer_setactive(&source, source.used);
|
||||||
|
isc_buffer_init(&target, buf2, sizeof buf2, ISC_BUFFERTYPE_BINARY);
|
||||||
|
dns_decompress_init(&dctx, -1, ISC_TRUE);
|
||||||
|
|
||||||
|
dns_name_init(&name, NULL);
|
||||||
|
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||||
|
&target) == DNS_R_SUCCESS);
|
||||||
|
dns_decompress_setmethods(&dctx, allowed);
|
||||||
|
dns_decompress_localinit(&dctx, &name, &source);
|
||||||
|
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||||
|
&target) == DNS_R_SUCCESS);
|
||||||
|
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||||
|
&target) == DNS_R_SUCCESS);
|
||||||
|
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||||
|
&target) == DNS_R_SUCCESS);
|
||||||
|
dns_decompress_localinvalidate(&dctx);
|
||||||
|
dns_decompress_invalidate(&dctx);
|
||||||
|
|
||||||
|
if (raw) {
|
||||||
|
unsigned int i;
|
||||||
|
for (i = 0 ; i < target.used ; /* */ ) {
|
||||||
|
fprintf(stdout, "%02x",
|
||||||
|
((unsigned char *)target.base)[i]);
|
||||||
|
if ((++i % 20) == 0)
|
||||||
|
fputs("\n", stdout);
|
||||||
|
else
|
||||||
|
if (i == target.used)
|
||||||
|
fputs("\n", stdout);
|
||||||
|
else
|
||||||
|
fputs(" ", stdout);
|
||||||
|
}
|
||||||
|
fputs("\n", stdout);
|
||||||
|
}
|
||||||
|
|
||||||
|
RUNTIME_CHECK(target.used == length);
|
||||||
|
RUNTIME_CHECK(memcmp(target.base, result, target.used) == 0);
|
||||||
|
isc_mem_destroy(&mctx);
|
||||||
|
}
|
@ -187,7 +187,6 @@ main(int argc, char *argv[]) {
|
|||||||
dns_rdata_init(&rdata);
|
dns_rdata_init(&rdata);
|
||||||
isc_buffer_init(&dbuf, inbuf, sizeof(inbuf),
|
isc_buffer_init(&dbuf, inbuf, sizeof(inbuf),
|
||||||
ISC_BUFFERTYPE_BINARY);
|
ISC_BUFFERTYPE_BINARY);
|
||||||
RUNTIME_CHECK(dns_compress_init(&cctx, -1, mctx) == DNS_R_SUCCESS);
|
|
||||||
result = dns_rdata_fromtext(&rdata, class, type, lex,
|
result = dns_rdata_fromtext(&rdata, class, type, lex,
|
||||||
NULL, ISC_FALSE, &dbuf, NULL);
|
NULL, ISC_FALSE, &dbuf, NULL);
|
||||||
if (result != DNS_R_SUCCESS) {
|
if (result != DNS_R_SUCCESS) {
|
||||||
@ -195,7 +194,6 @@ main(int argc, char *argv[]) {
|
|||||||
"dns_rdata_fromtext returned %s(%d)\n",
|
"dns_rdata_fromtext returned %s(%d)\n",
|
||||||
dns_result_totext(result), result);
|
dns_result_totext(result), result);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
dns_compress_invalidate(&cctx);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (raw) {
|
if (raw) {
|
||||||
@ -214,14 +212,21 @@ main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
/* Convert to wire and back? */
|
/* Convert to wire and back? */
|
||||||
if (wire) {
|
if (wire) {
|
||||||
|
result = dns_compress_init(&cctx, -1, mctx);
|
||||||
|
if (result != DNS_R_SUCCESS) {
|
||||||
|
fprintf(stdout,
|
||||||
|
"dns_compress_init returned %s(%d)\n",
|
||||||
|
dns_result_totext(result), result);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
isc_buffer_init(&wbuf, wirebuf, sizeof(wirebuf),
|
isc_buffer_init(&wbuf, wirebuf, sizeof(wirebuf),
|
||||||
ISC_BUFFERTYPE_BINARY);
|
ISC_BUFFERTYPE_BINARY);
|
||||||
result = dns_rdata_towire(&rdata, &cctx, &wbuf);
|
result = dns_rdata_towire(&rdata, &cctx, &wbuf);
|
||||||
|
dns_compress_invalidate(&cctx);
|
||||||
if (result != DNS_R_SUCCESS) {
|
if (result != DNS_R_SUCCESS) {
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
"dns_rdata_towire returned %s(%d)\n",
|
"dns_rdata_towire returned %s(%d)\n",
|
||||||
dns_result_totext(result), result);
|
dns_result_totext(result), result);
|
||||||
dns_compress_invalidate(&cctx);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
len = wbuf.used - wbuf.current;
|
len = wbuf.used - wbuf.current;
|
||||||
@ -253,14 +258,15 @@ main(int argc, char *argv[]) {
|
|||||||
dns_rdata_init(&rdata);
|
dns_rdata_init(&rdata);
|
||||||
isc_buffer_init(&dbuf, inbuf, sizeof(inbuf),
|
isc_buffer_init(&dbuf, inbuf, sizeof(inbuf),
|
||||||
ISC_BUFFERTYPE_BINARY);
|
ISC_BUFFERTYPE_BINARY);
|
||||||
|
dns_decompress_init(&dctx, -1, ISC_FALSE);
|
||||||
result = dns_rdata_fromwire(&rdata, class, type, &wbuf,
|
result = dns_rdata_fromwire(&rdata, class, type, &wbuf,
|
||||||
&dctx, ISC_FALSE, &dbuf);
|
&dctx, ISC_FALSE, &dbuf);
|
||||||
|
dns_decompress_invalidate(&dctx);
|
||||||
if (result != DNS_R_SUCCESS) {
|
if (result != DNS_R_SUCCESS) {
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
"dns_rdata_fromwire returned %s(%d)\n",
|
"dns_rdata_fromwire returned %s(%d)\n",
|
||||||
dns_result_totext(result), result);
|
dns_result_totext(result), result);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
dns_compress_invalidate(&cctx);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,7 +295,6 @@ main(int argc, char *argv[]) {
|
|||||||
fprintf(stdout, "\"%.*s\"\n",
|
fprintf(stdout, "\"%.*s\"\n",
|
||||||
(int)tbuf.used, (char*)tbuf.base);
|
(int)tbuf.used, (char*)tbuf.base);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
dns_compress_invalidate(&cctx);
|
|
||||||
if (lasttype == type) {
|
if (lasttype == type) {
|
||||||
fprintf(stdout, "dns_rdata_compare = %d\n",
|
fprintf(stdout, "dns_rdata_compare = %d\n",
|
||||||
dns_rdata_compare(&rdata, &last));
|
dns_rdata_compare(&rdata, &last));
|
||||||
|
@ -125,6 +125,10 @@ getname(dns_name_t *name, isc_buffer_t *source, isc_buffer_t *target) {
|
|||||||
dns_name_init(name, NULL);
|
dns_name_init(name, NULL);
|
||||||
|
|
||||||
current = source->current;
|
current = source->current;
|
||||||
|
if (dns_decompress_edns(&dctx) > 1 || !dns_decompress_strict(&dctx))
|
||||||
|
dns_decompress_setmethods(&dctx, DNS_COMPRESS_GLOBAL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(&dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
result = dns_name_fromwire(name, source, &dctx, ISC_FALSE, target);
|
result = dns_name_fromwire(name, source, &dctx, ISC_FALSE, target);
|
||||||
|
|
||||||
#ifdef NOISY
|
#ifdef NOISY
|
||||||
@ -259,9 +263,11 @@ getsection(isc_buffer_t *source, dns_namelist_t *section, unsigned int count,
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
rdata = &rdatas[rdcount++];
|
rdata = &rdatas[rdcount++];
|
||||||
|
dns_decompress_localinit(&dctx, name, source);
|
||||||
result = dns_rdata_fromwire(rdata, class, type,
|
result = dns_rdata_fromwire(rdata, class, type,
|
||||||
source, &dctx, ISC_FALSE,
|
source, &dctx, ISC_FALSE,
|
||||||
target);
|
target);
|
||||||
|
dns_decompress_localinvalidate(&dctx);
|
||||||
if (result != DNS_R_SUCCESS) {
|
if (result != DNS_R_SUCCESS) {
|
||||||
printf("%s\n", dns_result_totext(result));
|
printf("%s\n", dns_result_totext(result));
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -306,10 +312,12 @@ getmessage(dns_message_t *message, isc_buffer_t *source,
|
|||||||
message->aucount = getshort(source);
|
message->aucount = getshort(source);
|
||||||
message->adcount = getshort(source);
|
message->adcount = getshort(source);
|
||||||
|
|
||||||
|
dns_decompress_init(&dctx, -1, ISC_FALSE);
|
||||||
getquestions(source, &message->question, message->qcount, target);
|
getquestions(source, &message->question, message->qcount, target);
|
||||||
getsection(source, &message->answer, message->ancount, target);
|
getsection(source, &message->answer, message->ancount, target);
|
||||||
getsection(source, &message->authority, message->aucount, target);
|
getsection(source, &message->authority, message->aucount, target);
|
||||||
getsection(source, &message->additional, message->adcount, target);
|
getsection(source, &message->additional, message->adcount, target);
|
||||||
|
dns_decompress_invalidate(&dctx);
|
||||||
|
|
||||||
isc_buffer_remaining(source, &r);
|
isc_buffer_remaining(source, &r);
|
||||||
if (r.length != 0)
|
if (r.length != 0)
|
||||||
@ -558,13 +566,10 @@ main(int argc, char *argv[]) {
|
|||||||
rlcount = 0;
|
rlcount = 0;
|
||||||
ncount = 0;
|
ncount = 0;
|
||||||
|
|
||||||
dctx.allowed = DNS_COMPRESS_GLOBAL14;
|
|
||||||
dns_name_init(&dctx.owner_name, NULL);
|
|
||||||
|
|
||||||
isc_buffer_init(&source, b, sizeof b, ISC_BUFFERTYPE_BINARY);
|
isc_buffer_init(&source, b, sizeof b, ISC_BUFFERTYPE_BINARY);
|
||||||
isc_buffer_add(&source, bp - b);
|
isc_buffer_add(&source, bp - b);
|
||||||
isc_buffer_init(&target, t, sizeof t, ISC_BUFFERTYPE_BINARY);
|
isc_buffer_init(&target, t, sizeof t, ISC_BUFFERTYPE_BINARY);
|
||||||
|
|
||||||
getmessage(&message, &source, &target);
|
getmessage(&message, &source, &target);
|
||||||
result = printmessage(&message);
|
result = printmessage(&message);
|
||||||
if (result != DNS_R_SUCCESS)
|
if (result != DNS_R_SUCCESS)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Name Decompression
|
Name Decompression
|
||||||
|
|
||||||
$Id: decompression,v 1.2 1999/02/24 00:57:57 marka Exp $
|
$Id: decompression,v 1.3 1999/02/24 06:31:31 marka Exp $
|
||||||
|
|
||||||
Overview.
|
Overview.
|
||||||
|
|
||||||
@ -49,13 +49,13 @@ Types:
|
|||||||
|
|
||||||
Functions:
|
Functions:
|
||||||
|
|
||||||
dns_result_t
|
void
|
||||||
dns_decompress_init(dns_decompress_t *dctx, int edns,
|
dns_decompress_init(dns_decompress_t *dctx, int edns,
|
||||||
isc_boolean_t strict, isc_mctx_t *mctx);
|
isc_boolean_t strict);
|
||||||
initalise dctx
|
initalise dctx
|
||||||
dctx->ownername is invalidated
|
dctx->ownername is invalidated
|
||||||
|
|
||||||
dns_result_t
|
void
|
||||||
dns_decompress_localinit(dns_decompress_t *dctx, dns_name_t *name,
|
dns_decompress_localinit(dns_decompress_t *dctx, dns_name_t *name,
|
||||||
isc_buffer_t *source);
|
isc_buffer_t *source);
|
||||||
initalise dctx->ownername
|
initalise dctx->ownername
|
||||||
|
@ -218,6 +218,16 @@ fromwire_<I>classname_typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
isc_buffer_t *source, dns_decompress_t *dctx,
|
isc_buffer_t *source, dns_decompress_t *dctx,
|
||||||
isc_boolean_t downcase, isc_buffer_t *target);</CODE>
|
isc_boolean_t downcase, isc_buffer_t *target);</CODE>
|
||||||
</PRE>
|
</PRE>
|
||||||
|
<P>
|
||||||
|
<CODE>fromwire_<I>classname_typename</I>()</CODE> is required to set the valid
|
||||||
|
decompression methods if there is a domain name in the rdata.
|
||||||
|
<PRE>
|
||||||
|
<CODE>if (dns_decompress_edns(dctx) >= # || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_LOCAL);</CODE>
|
||||||
|
</PRE>
|
||||||
|
|
||||||
<DL>
|
<DL>
|
||||||
<DT><CODE>class</CODE></DT>
|
<DT><CODE>class</CODE></DT>
|
||||||
<DD>
|
<DD>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: compress.c,v 1.2 1999/02/23 02:25:39 marka Exp $ */
|
/* $Id: compress.c,v 1.3 1999/02/24 06:31:31 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -25,9 +25,12 @@
|
|||||||
|
|
||||||
#include <dns/compress.h>
|
#include <dns/compress.h>
|
||||||
|
|
||||||
#define CCTX_MAGIC 0x43435458U
|
#define CCTX_MAGIC 0x43435458U /* CCTX */
|
||||||
#define VALID_CCTX(x) ((x) != NULL && (x)->magic == CCTX_MAGIC)
|
#define VALID_CCTX(x) ((x) != NULL && (x)->magic == CCTX_MAGIC)
|
||||||
|
|
||||||
|
#define DCTX_MAGIC 0x44435458U /* DCTX */
|
||||||
|
#define VALID_DCTX(x) ((x) != NULL && (x)->magic == DCTX_MAGIC)
|
||||||
|
|
||||||
static void free_offset(void *offset, void *mctx);
|
static void free_offset(void *offset, void *mctx);
|
||||||
isc_boolean_t compress_find(dns_rbt_t *root, dns_name_t *name,
|
isc_boolean_t compress_find(dns_rbt_t *root, dns_name_t *name,
|
||||||
dns_name_t *prefix, dns_name_t *suffix,
|
dns_name_t *prefix, dns_name_t *suffix,
|
||||||
@ -37,6 +40,9 @@ void compress_add(dns_rbt_t *root, dns_name_t *prefix,
|
|||||||
dns_name_t *suffix, isc_uint16_t offset,
|
dns_name_t *suffix, isc_uint16_t offset,
|
||||||
isc_boolean_t global16, isc_mem_t *mctx);
|
isc_boolean_t global16, isc_mem_t *mctx);
|
||||||
|
|
||||||
|
/***
|
||||||
|
*** Compression
|
||||||
|
***/
|
||||||
|
|
||||||
dns_result_t
|
dns_result_t
|
||||||
dns_compress_init(dns_compress_t *cctx, int edns, isc_mem_t *mctx)
|
dns_compress_init(dns_compress_t *cctx, int edns, isc_mem_t *mctx)
|
||||||
@ -82,7 +88,7 @@ dns_compress_localinit(dns_compress_t *cctx, dns_name_t *owner,
|
|||||||
REQUIRE(VALID_CCTX(cctx));
|
REQUIRE(VALID_CCTX(cctx));
|
||||||
REQUIRE(cctx->local == NULL);
|
REQUIRE(cctx->local == NULL);
|
||||||
REQUIRE(dns_name_isabsolute(owner) == ISC_TRUE);
|
REQUIRE(dns_name_isabsolute(owner) == ISC_TRUE);
|
||||||
REQUIRE(target != NULL);
|
REQUIRE(isc_buffer_type(target) == ISC_BUFFERTYPE_BINARY);
|
||||||
|
|
||||||
result = dns_rbt_create(cctx->mctx, free_offset, cctx->mctx,
|
result = dns_rbt_create(cctx->mctx, free_offset, cctx->mctx,
|
||||||
&cctx->local);
|
&cctx->local);
|
||||||
@ -107,7 +113,7 @@ dns_compress_localinit(dns_compress_t *cctx, dns_name_t *owner,
|
|||||||
while (labels > 0) {
|
while (labels > 0) {
|
||||||
dns_name_getlabelsequence(owner, wl, labels, &name);
|
dns_name_getlabelsequence(owner, wl, labels, &name);
|
||||||
data = isc_mem_get(cctx->mctx, sizeof *data);
|
data = isc_mem_get(cctx->mctx, sizeof *data);
|
||||||
if (data != NULL)
|
if (data == NULL)
|
||||||
return (DNS_R_SUCCESS);
|
return (DNS_R_SUCCESS);
|
||||||
*data = ll;
|
*data = ll;
|
||||||
result = dns_rbt_addname(cctx->local, &name, data);
|
result = dns_rbt_addname(cctx->local, &name, data);
|
||||||
@ -143,7 +149,7 @@ dns_compress_localinit(dns_compress_t *cctx, dns_name_t *owner,
|
|||||||
if (result != DNS_R_SUCCESS)
|
if (result != DNS_R_SUCCESS)
|
||||||
return (DNS_R_SUCCESS);
|
return (DNS_R_SUCCESS);
|
||||||
data = isc_mem_get(cctx->mctx, sizeof *data);
|
data = isc_mem_get(cctx->mctx, sizeof *data);
|
||||||
if (data != NULL)
|
if (data == NULL)
|
||||||
return (DNS_R_SUCCESS);
|
return (DNS_R_SUCCESS);
|
||||||
*data = ll;
|
*data = ll;
|
||||||
result = dns_rbt_addname(cctx->local, &name, data);
|
result = dns_rbt_addname(cctx->local, &name, data);
|
||||||
@ -259,6 +265,85 @@ dns_compress_backout(dns_compress_t *cctx, isc_uint16_t offset) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
*** Decompression
|
||||||
|
***/
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_init(dns_decompress_t *dctx, int edns, isc_boolean_t strict) {
|
||||||
|
|
||||||
|
REQUIRE(dctx != NULL);
|
||||||
|
REQUIRE(edns >= -1 && edns <= 255);
|
||||||
|
|
||||||
|
dctx->allowed = DNS_COMPRESS_NONE;
|
||||||
|
dctx->edns = edns;
|
||||||
|
dctx->strict = strict;
|
||||||
|
dctx->rdata = 0;
|
||||||
|
dns_name_init(&dctx->owner_name, NULL);
|
||||||
|
dns_name_invalidate(&dctx->owner_name);
|
||||||
|
dctx->magic = DCTX_MAGIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_localinit(dns_decompress_t *dctx, dns_name_t *name,
|
||||||
|
isc_buffer_t *source)
|
||||||
|
{
|
||||||
|
REQUIRE(VALID_DCTX(dctx));
|
||||||
|
REQUIRE(dns_name_isabsolute(name) == ISC_TRUE);
|
||||||
|
REQUIRE(isc_buffer_type(source) == ISC_BUFFERTYPE_BINARY);
|
||||||
|
|
||||||
|
dctx->rdata = source->current;
|
||||||
|
dctx->owner_name = *name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_invalidate(dns_decompress_t *dctx) {
|
||||||
|
|
||||||
|
REQUIRE(VALID_DCTX(dctx));
|
||||||
|
|
||||||
|
dctx->magic = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_localinvalidate(dns_decompress_t *dctx) {
|
||||||
|
|
||||||
|
REQUIRE(VALID_DCTX(dctx));
|
||||||
|
|
||||||
|
dns_name_invalidate(&dctx->owner_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed) {
|
||||||
|
|
||||||
|
REQUIRE(VALID_DCTX(dctx));
|
||||||
|
|
||||||
|
dctx->allowed = allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
dns_decompress_getmethods(dns_decompress_t *dctx) {
|
||||||
|
|
||||||
|
REQUIRE(VALID_DCTX(dctx));
|
||||||
|
|
||||||
|
return (dctx->allowed);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
dns_decompress_edns(dns_decompress_t *dctx) {
|
||||||
|
|
||||||
|
REQUIRE(VALID_DCTX(dctx));
|
||||||
|
|
||||||
|
return (dctx->edns);
|
||||||
|
}
|
||||||
|
|
||||||
|
isc_boolean_t
|
||||||
|
dns_decompress_strict(dns_decompress_t *dctx) {
|
||||||
|
|
||||||
|
REQUIRE(VALID_DCTX(dctx));
|
||||||
|
|
||||||
|
return (dctx->strict);
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Private
|
*** Private
|
||||||
***/
|
***/
|
||||||
|
@ -48,8 +48,12 @@ struct dns_compress {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct dns_decompress {
|
struct dns_decompress {
|
||||||
unsigned int allowed; /* Allowed methods. */
|
unsigned int magic; /* Magic number. */
|
||||||
dns_name_t owner_name; /* For local compression. */
|
unsigned int allowed; /* Allowed methods. */
|
||||||
|
unsigned int rdata; /* Start of local rdata. */
|
||||||
|
int edns; /* Edns version or -1. */
|
||||||
|
isc_boolean_t strict; /* Strict checking */
|
||||||
|
dns_name_t owner_name; /* For local compression. */
|
||||||
};
|
};
|
||||||
|
|
||||||
dns_result_t dns_compress_init(dns_compress_t *cctx, int edns,
|
dns_result_t dns_compress_init(dns_compress_t *cctx, int edns,
|
||||||
@ -220,4 +224,29 @@ dns_compress_backout(dns_compress_t *cctx, isc_uint16_t offset);
|
|||||||
* 'cctx' is initalised.
|
* 'cctx' is initalised.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_init(dns_decompress_t *dctx, int edns, isc_boolean_t strict);
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_localinit(dns_decompress_t *dctx, dns_name_t *name,
|
||||||
|
isc_buffer_t *source);
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_invalidate(dns_decompress_t *dctx);
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_localinvalidate(dns_decompress_t *dctx);
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed);
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
dns_decompress_getmethods(dns_decompress_t *dctx);
|
||||||
|
|
||||||
|
int
|
||||||
|
dns_decompress_edns(dns_decompress_t *dctx);
|
||||||
|
|
||||||
|
isc_boolean_t
|
||||||
|
dns_decompress_strict(dns_decompress_t *dctx);
|
||||||
|
|
||||||
#endif /* DNS_COMPRESS_H */
|
#endif /* DNS_COMPRESS_H */
|
||||||
|
113
lib/dns/name.c
113
lib/dns/name.c
@ -1670,13 +1670,18 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||||||
isc_buffer_t *target)
|
isc_buffer_t *target)
|
||||||
{
|
{
|
||||||
unsigned char *cdata, *ndata;
|
unsigned char *cdata, *ndata;
|
||||||
unsigned int cused, hops, nrem, nused, labels, n;
|
unsigned int cused, hops, nrem, nused, labels, n, i, ll;
|
||||||
unsigned int current, new_current, biggest_pointer;
|
unsigned int current, new_current, biggest_pointer, lcount;
|
||||||
isc_boolean_t saw_bitstring, done;
|
isc_boolean_t saw_bitstring, done, local;
|
||||||
fw_state state = fw_start;
|
fw_state state = fw_start;
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
unsigned char *offsets;
|
unsigned char *offsets;
|
||||||
dns_offsets_t odata;
|
dns_offsets_t odata;
|
||||||
|
dns_name_t suffix;
|
||||||
|
dns_label_t label;
|
||||||
|
dns_labeltype_t labeltype;
|
||||||
|
unsigned int bits;
|
||||||
|
dns_bitlabel_t bit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy the possibly-compressed name at source into target,
|
* Copy the possibly-compressed name at source into target,
|
||||||
@ -1711,6 +1716,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||||||
*/
|
*/
|
||||||
labels = 0;
|
labels = 0;
|
||||||
hops = 0;
|
hops = 0;
|
||||||
|
local = ISC_FALSE;
|
||||||
saw_bitstring = ISC_FALSE;
|
saw_bitstring = ISC_FALSE;
|
||||||
done = ISC_FALSE;
|
done = ISC_FALSE;
|
||||||
ndata = (unsigned char *)target->base + target->used;
|
ndata = (unsigned char *)target->base + target->used;
|
||||||
@ -1747,6 +1753,17 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||||||
done = ISC_TRUE;
|
done = ISC_TRUE;
|
||||||
n = c;
|
n = c;
|
||||||
state = fw_ordinary;
|
state = fw_ordinary;
|
||||||
|
} else if (c >= 128 && c < 192) {
|
||||||
|
/*
|
||||||
|
* 14 bit local compression pointer.
|
||||||
|
*/
|
||||||
|
if ((dctx->allowed & DNS_COMPRESS_LOCAL) ==
|
||||||
|
0)
|
||||||
|
return (DNS_R_DISALLOWED);
|
||||||
|
local = ISC_TRUE;
|
||||||
|
new_current = c & 0x3F;
|
||||||
|
n = 1;
|
||||||
|
state = fw_newcurrent;
|
||||||
} else if (c >= 192) {
|
} else if (c >= 192) {
|
||||||
/*
|
/*
|
||||||
* Ordinary 14-bit pointer.
|
* Ordinary 14-bit pointer.
|
||||||
@ -1754,6 +1771,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||||||
if ((dctx->allowed & DNS_COMPRESS_GLOBAL14) ==
|
if ((dctx->allowed & DNS_COMPRESS_GLOBAL14) ==
|
||||||
0)
|
0)
|
||||||
return (DNS_R_DISALLOWED);
|
return (DNS_R_DISALLOWED);
|
||||||
|
local = ISC_FALSE;
|
||||||
new_current = c & 0x3F;
|
new_current = c & 0x3F;
|
||||||
n = 1;
|
n = 1;
|
||||||
state = fw_newcurrent;
|
state = fw_newcurrent;
|
||||||
@ -1773,19 +1791,21 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||||||
if ((dctx->allowed & DNS_COMPRESS_GLOBAL16) ==
|
if ((dctx->allowed & DNS_COMPRESS_GLOBAL16) ==
|
||||||
0)
|
0)
|
||||||
return (DNS_R_DISALLOWED);
|
return (DNS_R_DISALLOWED);
|
||||||
|
local = ISC_FALSE;
|
||||||
new_current = 0;
|
new_current = 0;
|
||||||
n = 2;
|
n = 2;
|
||||||
state = fw_newcurrent;
|
state = fw_newcurrent;
|
||||||
} else if (c == DNS_LABELTYPE_LOCALCOMP) {
|
} else if (c == DNS_LABELTYPE_LOCALCOMP) {
|
||||||
/*
|
/*
|
||||||
* Local compression.
|
* 16 bit local compression.
|
||||||
*/
|
*/
|
||||||
if ((dctx->allowed & DNS_COMPRESS_LOCAL) ==
|
if ((dctx->allowed & DNS_COMPRESS_LOCAL) ==
|
||||||
0)
|
0)
|
||||||
return (DNS_R_DISALLOWED);
|
return (DNS_R_DISALLOWED);
|
||||||
|
local = ISC_TRUE;
|
||||||
/* XXX */
|
new_current = 0;
|
||||||
return (DNS_R_NOTIMPLEMENTED);
|
n = 2;
|
||||||
|
state = fw_newcurrent;
|
||||||
} else
|
} else
|
||||||
return (DNS_R_BADLABELTYPE);
|
return (DNS_R_BADLABELTYPE);
|
||||||
break;
|
break;
|
||||||
@ -1817,18 +1837,77 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||||||
new_current *= 256;
|
new_current *= 256;
|
||||||
new_current += c;
|
new_current += c;
|
||||||
n--;
|
n--;
|
||||||
if (n == 0) {
|
if (n != 0)
|
||||||
if (new_current >= biggest_pointer)
|
break;
|
||||||
|
if (local && new_current < 256) {
|
||||||
|
/* logical label count */
|
||||||
|
lcount = dctx->owner_name.labels;
|
||||||
|
i = 0;
|
||||||
|
ll = 0;
|
||||||
|
while (i < lcount && ll < new_current) {
|
||||||
|
dns_name_getlabel(&dctx->owner_name,
|
||||||
|
i, &label);
|
||||||
|
labeltype = dns_label_type(&label);
|
||||||
|
if (labeltype ==
|
||||||
|
dns_labeltype_ordinary) {
|
||||||
|
i++;
|
||||||
|
ll++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
INSIST(labeltype ==
|
||||||
|
dns_labeltype_bitstring);
|
||||||
|
bits = dns_label_countbits(&label);
|
||||||
|
if (bits + ll <= new_current) {
|
||||||
|
i++;
|
||||||
|
ll += bits;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (i == lcount)
|
||||||
return (DNS_R_BADPOINTER);
|
return (DNS_R_BADPOINTER);
|
||||||
biggest_pointer = new_current;
|
bits = new_current - ll;
|
||||||
current = new_current;
|
if (bits != 0) {
|
||||||
cdata = (unsigned char *)source->base +
|
if (nrem < 2 + (bits + 7) / 8)
|
||||||
current;
|
return (DNS_R_NOSPACE);
|
||||||
hops++;
|
*ndata++ = DNS_LABELTYPE_BITSTRING;
|
||||||
if (hops > DNS_POINTER_MAXHOPS)
|
*ndata++ = bits;
|
||||||
return (DNS_R_TOOMANYHOPS);
|
ndata[bits/8] = 0;
|
||||||
state = fw_start;
|
while (bits) {
|
||||||
|
bit = dns_label_getbit(&label,
|
||||||
|
bits);
|
||||||
|
set_bit(ndata, bits, bit);
|
||||||
|
bits--;
|
||||||
|
}
|
||||||
|
ndata += (new_current - ll + 7) / 8;
|
||||||
|
labels++;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
dns_name_init(&suffix, NULL);
|
||||||
|
dns_name_getlabelsequence(&dctx->owner_name, i,
|
||||||
|
lcount - i, &suffix);
|
||||||
|
if (suffix.length > nrem)
|
||||||
|
return (DNS_R_NOSPACE);
|
||||||
|
memcpy(ndata, suffix.ndata, suffix.length);
|
||||||
|
ndata += suffix.length;
|
||||||
|
nused += suffix.length;
|
||||||
|
nrem -= suffix.length;
|
||||||
|
labels += suffix.labels;
|
||||||
|
done = ISC_TRUE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
if (local)
|
||||||
|
new_current += dctx->rdata - 256;
|
||||||
|
if (new_current >= biggest_pointer)
|
||||||
|
return (DNS_R_BADPOINTER);
|
||||||
|
biggest_pointer = new_current;
|
||||||
|
current = new_current;
|
||||||
|
cdata = (unsigned char *)source->base +
|
||||||
|
current;
|
||||||
|
hops++;
|
||||||
|
if (hops > DNS_POINTER_MAXHOPS)
|
||||||
|
return (DNS_R_TOOMANYHOPS);
|
||||||
|
state = fw_start;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FATAL_ERROR(__FILE__, __LINE__,
|
FATAL_ERROR(__FILE__, __LINE__,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: tsig_250.c,v 1.6 1999/02/22 07:23:59 marka Exp $ */
|
/* $Id: tsig_250.c,v 1.7 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-dnsind-tsig-07.txt */
|
/* draft-ietf-dnsind-tsig-07.txt */
|
||||||
|
|
||||||
@ -187,6 +187,11 @@ fromwire_any_tsig(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 250);
|
REQUIRE(type == 250);
|
||||||
REQUIRE(class == 255);
|
REQUIRE(class == 255);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
/* Algorithm Name */
|
/* Algorithm Name */
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: tsig_250.h,v 1.6 1999/02/22 07:23:59 marka Exp $ */
|
/* $Id: tsig_250.h,v 1.7 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-dnsind-tsig-07.txt */
|
/* draft-ietf-dnsind-tsig-07.txt */
|
||||||
|
|
||||||
@ -187,6 +187,11 @@ fromwire_any_tsig(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 250);
|
REQUIRE(type == 250);
|
||||||
REQUIRE(class == 255);
|
REQUIRE(class == 255);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
/* Algorithm Name */
|
/* Algorithm Name */
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: afsdb_18.c,v 1.4 1999/02/22 07:23:59 marka Exp $ */
|
/* $Id: afsdb_18.c,v 1.5 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1183 */
|
/* RFC 1183 */
|
||||||
|
|
||||||
@ -86,6 +86,11 @@ fromwire_afsdb(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
isc_buffer_active(source, &sr);
|
isc_buffer_active(source, &sr);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: afsdb_18.h,v 1.4 1999/02/22 07:23:59 marka Exp $ */
|
/* $Id: afsdb_18.h,v 1.5 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1183 */
|
/* RFC 1183 */
|
||||||
|
|
||||||
@ -86,6 +86,11 @@ fromwire_afsdb(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
isc_buffer_active(source, &sr);
|
isc_buffer_active(source, &sr);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: cname_5.c,v 1.10 1999/02/22 07:23:59 marka Exp $ */
|
/* $Id: cname_5.c,v 1.11 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_CNAME_5_H
|
#ifndef RDATA_GENERIC_CNAME_5_H
|
||||||
#define RDATA_GENERIC_CNAME_5_H
|
#define RDATA_GENERIC_CNAME_5_H
|
||||||
@ -73,6 +73,11 @@ fromwire_cname(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: cname_5.h,v 1.10 1999/02/22 07:23:59 marka Exp $ */
|
/* $Id: cname_5.h,v 1.11 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_CNAME_5_H
|
#ifndef RDATA_GENERIC_CNAME_5_H
|
||||||
#define RDATA_GENERIC_CNAME_5_H
|
#define RDATA_GENERIC_CNAME_5_H
|
||||||
@ -73,6 +73,11 @@ fromwire_cname(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dname_39.c,v 1.3 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: dname_39.c,v 1.4 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-dnsind-dname-02.txt */
|
/* draft-ietf-dnsind-dname-02.txt */
|
||||||
|
|
||||||
@ -73,6 +73,11 @@ fromwire_dname(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 39);
|
REQUIRE(type == 39);
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_LOCAL);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
}
|
}
|
||||||
@ -87,7 +92,7 @@ towire_dname(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||||||
if (dns_compress_getedns(cctx) >= 1)
|
if (dns_compress_getedns(cctx) >= 1)
|
||||||
dns_compress_setmethods(cctx, DNS_COMPRESS_ALL);
|
dns_compress_setmethods(cctx, DNS_COMPRESS_ALL);
|
||||||
else
|
else
|
||||||
dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
|
dns_compress_setmethods(cctx, DNS_COMPRESS_LOCAL);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
dns_rdata_toregion(rdata, ®ion);
|
dns_rdata_toregion(rdata, ®ion);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dname_39.h,v 1.3 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: dname_39.h,v 1.4 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-dnsind-dname-02.txt */
|
/* draft-ietf-dnsind-dname-02.txt */
|
||||||
|
|
||||||
@ -73,6 +73,11 @@ fromwire_dname(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 39);
|
REQUIRE(type == 39);
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_LOCAL);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
return(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
}
|
}
|
||||||
@ -87,7 +92,7 @@ towire_dname(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||||||
if (dns_compress_getedns(cctx) >= 1)
|
if (dns_compress_getedns(cctx) >= 1)
|
||||||
dns_compress_setmethods(cctx, DNS_COMPRESS_ALL);
|
dns_compress_setmethods(cctx, DNS_COMPRESS_ALL);
|
||||||
else
|
else
|
||||||
dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
|
dns_compress_setmethods(cctx, DNS_COMPRESS_LOCAL);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
dns_rdata_toregion(rdata, ®ion);
|
dns_rdata_toregion(rdata, ®ion);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mb_7.c,v 1.10 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: mb_7.c,v 1.11 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MB_7_H
|
#ifndef RDATA_GENERIC_MB_7_H
|
||||||
#define RDATA_GENERIC_MB_7_H
|
#define RDATA_GENERIC_MB_7_H
|
||||||
@ -72,6 +72,11 @@ fromwire_mb(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 7);
|
REQUIRE(type == 7);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mb_7.h,v 1.10 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: mb_7.h,v 1.11 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MB_7_H
|
#ifndef RDATA_GENERIC_MB_7_H
|
||||||
#define RDATA_GENERIC_MB_7_H
|
#define RDATA_GENERIC_MB_7_H
|
||||||
@ -72,6 +72,11 @@ fromwire_mb(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 7);
|
REQUIRE(type == 7);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: md_3.c,v 1.10 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: md_3.c,v 1.11 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MD_3_H
|
#ifndef RDATA_GENERIC_MD_3_H
|
||||||
#define RDATA_GENERIC_MD_3_H
|
#define RDATA_GENERIC_MD_3_H
|
||||||
@ -70,6 +70,11 @@ fromwire_md(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 3);
|
REQUIRE(type == 3);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: md_3.h,v 1.10 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: md_3.h,v 1.11 1999/02/24 06:31:32 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MD_3_H
|
#ifndef RDATA_GENERIC_MD_3_H
|
||||||
#define RDATA_GENERIC_MD_3_H
|
#define RDATA_GENERIC_MD_3_H
|
||||||
@ -70,6 +70,11 @@ fromwire_md(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 3);
|
REQUIRE(type == 3);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mf_4.c,v 1.9 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: mf_4.c,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MF_4_H
|
#ifndef RDATA_GENERIC_MF_4_H
|
||||||
#define RDATA_GENERIC_MF_4_H
|
#define RDATA_GENERIC_MF_4_H
|
||||||
@ -70,6 +70,11 @@ fromwire_mf(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 4);
|
REQUIRE(type == 4);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mf_4.h,v 1.9 1999/02/22 07:24:00 marka Exp $ */
|
/* $Id: mf_4.h,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MF_4_H
|
#ifndef RDATA_GENERIC_MF_4_H
|
||||||
#define RDATA_GENERIC_MF_4_H
|
#define RDATA_GENERIC_MF_4_H
|
||||||
@ -70,6 +70,11 @@ fromwire_mf(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 4);
|
REQUIRE(type == 4);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mg_8.c,v 1.9 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: mg_8.c,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MG_8_H
|
#ifndef RDATA_GENERIC_MG_8_H
|
||||||
#define RDATA_GENERIC_MG_8_H
|
#define RDATA_GENERIC_MG_8_H
|
||||||
@ -72,6 +72,11 @@ fromwire_mg(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 8);
|
REQUIRE(type == 8);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mg_8.h,v 1.9 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: mg_8.h,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MG_8_H
|
#ifndef RDATA_GENERIC_MG_8_H
|
||||||
#define RDATA_GENERIC_MG_8_H
|
#define RDATA_GENERIC_MG_8_H
|
||||||
@ -72,6 +72,11 @@ fromwire_mg(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 8);
|
REQUIRE(type == 8);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: minfo_14.c,v 1.10 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: minfo_14.c,v 1.11 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MINFO_14_H
|
#ifndef RDATA_GENERIC_MINFO_14_H
|
||||||
#define RDATA_GENERIC_MINFO_14_H
|
#define RDATA_GENERIC_MINFO_14_H
|
||||||
@ -89,6 +89,11 @@ fromwire_minfo(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 14);
|
REQUIRE(type == 14);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
dns_name_init(&rmail, NULL);
|
dns_name_init(&rmail, NULL);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: minfo_14.h,v 1.10 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: minfo_14.h,v 1.11 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MINFO_14_H
|
#ifndef RDATA_GENERIC_MINFO_14_H
|
||||||
#define RDATA_GENERIC_MINFO_14_H
|
#define RDATA_GENERIC_MINFO_14_H
|
||||||
@ -89,6 +89,11 @@ fromwire_minfo(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 14);
|
REQUIRE(type == 14);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
dns_name_init(&rmail, NULL);
|
dns_name_init(&rmail, NULL);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mr_9.c,v 1.9 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: mr_9.c,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MR_9_H
|
#ifndef RDATA_GENERIC_MR_9_H
|
||||||
#define RDATA_GENERIC_MR_9_H
|
#define RDATA_GENERIC_MR_9_H
|
||||||
@ -72,6 +72,11 @@ fromwire_mr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 9);
|
REQUIRE(type == 9);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mr_9.h,v 1.9 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: mr_9.h,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MR_9_H
|
#ifndef RDATA_GENERIC_MR_9_H
|
||||||
#define RDATA_GENERIC_MR_9_H
|
#define RDATA_GENERIC_MR_9_H
|
||||||
@ -72,6 +72,11 @@ fromwire_mr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 9);
|
REQUIRE(type == 9);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mx_15.c,v 1.12 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: mx_15.c,v 1.13 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MX_15_H
|
#ifndef RDATA_GENERIC_MX_15_H
|
||||||
#define RDATA_GENERIC_MX_15_H
|
#define RDATA_GENERIC_MX_15_H
|
||||||
@ -81,7 +81,13 @@ fromwire_mx(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
isc_region_t tregion;
|
isc_region_t tregion;
|
||||||
|
|
||||||
REQUIRE(type == 15);
|
REQUIRE(type == 15);
|
||||||
|
|
||||||
class = class; /* unused */
|
class = class; /* unused */
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mx_15.h,v 1.12 1999/02/22 07:24:01 marka Exp $ */
|
/* $Id: mx_15.h,v 1.13 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_MX_15_H
|
#ifndef RDATA_GENERIC_MX_15_H
|
||||||
#define RDATA_GENERIC_MX_15_H
|
#define RDATA_GENERIC_MX_15_H
|
||||||
@ -81,7 +81,13 @@ fromwire_mx(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
isc_region_t tregion;
|
isc_region_t tregion;
|
||||||
|
|
||||||
REQUIRE(type == 15);
|
REQUIRE(type == 15);
|
||||||
|
|
||||||
class = class; /* unused */
|
class = class; /* unused */
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: ns_2.c,v 1.9 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: ns_2.c,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_NS_2_H
|
#ifndef RDATA_GENERIC_NS_2_H
|
||||||
#define RDATA_GENERIC_NS_2_H
|
#define RDATA_GENERIC_NS_2_H
|
||||||
@ -72,6 +72,11 @@ fromwire_ns(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 2);
|
REQUIRE(type == 2);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: ns_2.h,v 1.9 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: ns_2.h,v 1.10 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_NS_2_H
|
#ifndef RDATA_GENERIC_NS_2_H
|
||||||
#define RDATA_GENERIC_NS_2_H
|
#define RDATA_GENERIC_NS_2_H
|
||||||
@ -72,6 +72,11 @@ fromwire_ns(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 2);
|
REQUIRE(type == 2);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: nxt_30.c,v 1.6 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: nxt_30.c,v 1.7 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2065 */
|
/* RFC 2065 */
|
||||||
|
|
||||||
@ -128,6 +128,11 @@ fromwire_nxt(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: nxt_30.h,v 1.6 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: nxt_30.h,v 1.7 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2065 */
|
/* RFC 2065 */
|
||||||
|
|
||||||
@ -128,6 +128,11 @@ fromwire_nxt(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
RETERR(dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: proforma.c,v 1.7 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: proforma.c,v 1.8 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_#_#_H
|
#ifndef RDATA_GENERIC_#_#_H
|
||||||
#define RDATA_GENERIC_#_#_H
|
#define RDATA_GENERIC_#_#_H
|
||||||
@ -51,6 +51,11 @@ fromwire_#(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == #);
|
REQUIRE(type == #);
|
||||||
REQUIRE(class == #);
|
REQUIRE(class == #);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_LOCAL);
|
||||||
|
|
||||||
return (DNS_R_NOTIMPLEMENTED);
|
return (DNS_R_NOTIMPLEMENTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: proforma.h,v 1.7 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: proforma.h,v 1.8 1999/02/24 06:31:33 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_#_#_H
|
#ifndef RDATA_GENERIC_#_#_H
|
||||||
#define RDATA_GENERIC_#_#_H
|
#define RDATA_GENERIC_#_#_H
|
||||||
@ -51,6 +51,11 @@ fromwire_#(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == #);
|
REQUIRE(type == #);
|
||||||
REQUIRE(class == #);
|
REQUIRE(class == #);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_LOCAL);
|
||||||
|
|
||||||
return (DNS_R_NOTIMPLEMENTED);
|
return (DNS_R_NOTIMPLEMENTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: ptr_12.c,v 1.10 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: ptr_12.c,v 1.11 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_PTR_12_H
|
#ifndef RDATA_GENERIC_PTR_12_H
|
||||||
#define RDATA_GENERIC_PTR_12_H
|
#define RDATA_GENERIC_PTR_12_H
|
||||||
@ -72,6 +72,11 @@ fromwire_ptr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 12);
|
REQUIRE(type == 12);
|
||||||
|
|
||||||
class = class; /* unused */
|
class = class; /* unused */
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: ptr_12.h,v 1.10 1999/02/22 07:24:02 marka Exp $ */
|
/* $Id: ptr_12.h,v 1.11 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_PTR_12_H
|
#ifndef RDATA_GENERIC_PTR_12_H
|
||||||
#define RDATA_GENERIC_PTR_12_H
|
#define RDATA_GENERIC_PTR_12_H
|
||||||
@ -72,6 +72,11 @@ fromwire_ptr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 12);
|
REQUIRE(type == 12);
|
||||||
|
|
||||||
class = class; /* unused */
|
class = class; /* unused */
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rp_17.c,v 1.4 1999/02/22 07:24:03 marka Exp $ */
|
/* $Id: rp_17.c,v 1.5 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1183 */
|
/* RFC 1183 */
|
||||||
|
|
||||||
@ -93,6 +93,11 @@ fromwire_rp(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&rmail, NULL);
|
dns_name_init(&rmail, NULL);
|
||||||
dns_name_init(&email, NULL);
|
dns_name_init(&email, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rp_17.h,v 1.4 1999/02/22 07:24:03 marka Exp $ */
|
/* $Id: rp_17.h,v 1.5 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1183 */
|
/* RFC 1183 */
|
||||||
|
|
||||||
@ -93,6 +93,11 @@ fromwire_rp(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&rmail, NULL);
|
dns_name_init(&rmail, NULL);
|
||||||
dns_name_init(&email, NULL);
|
dns_name_init(&email, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rt_21.c,v 1.4 1999/02/22 07:24:03 marka Exp $ */
|
/* $Id: rt_21.c,v 1.5 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1183 */
|
/* RFC 1183 */
|
||||||
|
|
||||||
@ -84,6 +84,11 @@ fromwire_rt(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 21);
|
REQUIRE(type == 21);
|
||||||
class = class; /* unused */
|
class = class; /* unused */
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rt_21.h,v 1.4 1999/02/22 07:24:03 marka Exp $ */
|
/* $Id: rt_21.h,v 1.5 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1183 */
|
/* RFC 1183 */
|
||||||
|
|
||||||
@ -84,6 +84,11 @@ fromwire_rt(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 21);
|
REQUIRE(type == 21);
|
||||||
class = class; /* unused */
|
class = class; /* unused */
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: sig_24.c,v 1.8 1999/02/22 07:24:03 marka Exp $ */
|
/* $Id: sig_24.c,v 1.9 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2065 */
|
/* RFC 2065 */
|
||||||
|
|
||||||
@ -180,6 +180,11 @@ fromwire_sig(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
|
|
||||||
REQUIRE(type == 24);
|
REQUIRE(type == 24);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: sig_24.h,v 1.8 1999/02/22 07:24:03 marka Exp $ */
|
/* $Id: sig_24.h,v 1.9 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2065 */
|
/* RFC 2065 */
|
||||||
|
|
||||||
@ -180,6 +180,11 @@ fromwire_sig(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
|
|
||||||
REQUIRE(type == 24);
|
REQUIRE(type == 24);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: soa_6.c,v 1.13 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: soa_6.c,v 1.14 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_SOA_6_H
|
#ifndef RDATA_GENERIC_SOA_6_H
|
||||||
#define RDATA_GENERIC_SOA_6_H
|
#define RDATA_GENERIC_SOA_6_H
|
||||||
@ -113,6 +113,11 @@ fromwire_soa(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&mname, NULL);
|
dns_name_init(&mname, NULL);
|
||||||
dns_name_init(&rname, NULL);
|
dns_name_init(&rname, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: soa_6.h,v 1.13 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: soa_6.h,v 1.14 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_SOA_6_H
|
#ifndef RDATA_GENERIC_SOA_6_H
|
||||||
#define RDATA_GENERIC_SOA_6_H
|
#define RDATA_GENERIC_SOA_6_H
|
||||||
@ -113,6 +113,11 @@ fromwire_soa(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
|
||||||
|
|
||||||
dns_name_init(&mname, NULL);
|
dns_name_init(&mname, NULL);
|
||||||
dns_name_init(&rname, NULL);
|
dns_name_init(&rname, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: tkey_249.c,v 1.6 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: tkey_249.c,v 1.7 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-dnssec-tkey-01.txt */
|
/* draft-ietf-dnssec-tkey-01.txt */
|
||||||
|
|
||||||
@ -179,6 +179,11 @@ fromwire_tkey(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 249);
|
REQUIRE(type == 249);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
/* Algorithm */
|
/* Algorithm */
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: tkey_249.h,v 1.6 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: tkey_249.h,v 1.7 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-dnssec-tkey-01.txt */
|
/* draft-ietf-dnssec-tkey-01.txt */
|
||||||
|
|
||||||
@ -179,6 +179,11 @@ fromwire_tkey(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 249);
|
REQUIRE(type == 249);
|
||||||
|
|
||||||
class = class; /*unused*/
|
class = class; /*unused*/
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
/* Algorithm */
|
/* Algorithm */
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: a6_38.c,v 1.6 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: a6_38.c,v 1.7 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-ipngwg-dns-lookups-03.txt */
|
/* draft-ietf-ipngwg-dns-lookups-03.txt */
|
||||||
|
|
||||||
@ -149,6 +149,11 @@ fromwire_in_a6(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 38);
|
REQUIRE(type == 38);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
isc_buffer_active(source, &sr);
|
isc_buffer_active(source, &sr);
|
||||||
/* prefix length */
|
/* prefix length */
|
||||||
if (sr.length < 1)
|
if (sr.length < 1)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: a6_38.h,v 1.6 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: a6_38.h,v 1.7 1999/02/24 06:31:34 marka Exp $ */
|
||||||
|
|
||||||
/* draft-ietf-ipngwg-dns-lookups-03.txt */
|
/* draft-ietf-ipngwg-dns-lookups-03.txt */
|
||||||
|
|
||||||
@ -149,6 +149,11 @@ fromwire_in_a6(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
REQUIRE(type == 38);
|
REQUIRE(type == 38);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
isc_buffer_active(source, &sr);
|
isc_buffer_active(source, &sr);
|
||||||
/* prefix length */
|
/* prefix length */
|
||||||
if (sr.length < 1)
|
if (sr.length < 1)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: kx_36.c,v 1.4 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: kx_36.c,v 1.5 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2230 */
|
/* RFC 2230 */
|
||||||
|
|
||||||
@ -82,6 +82,11 @@ fromwire_in_kx(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 36);
|
REQUIRE(type == 36);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: kx_36.h,v 1.4 1999/02/22 07:24:04 marka Exp $ */
|
/* $Id: kx_36.h,v 1.5 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2230 */
|
/* RFC 2230 */
|
||||||
|
|
||||||
@ -82,6 +82,11 @@ fromwire_in_kx(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 36);
|
REQUIRE(type == 36);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: naptr_35.c,v 1.4 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: naptr_35.c,v 1.5 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2168 */
|
/* RFC 2168 */
|
||||||
|
|
||||||
@ -121,6 +121,11 @@ fromwire_in_naptr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 35);
|
REQUIRE(type == 35);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: naptr_35.h,v 1.4 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: naptr_35.h,v 1.5 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2168 */
|
/* RFC 2168 */
|
||||||
|
|
||||||
@ -121,6 +121,11 @@ fromwire_in_naptr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 35);
|
REQUIRE(type == 35);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: nsap-ptr_23.c,v 1.3 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: nsap-ptr_23.c,v 1.4 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1348 */
|
/* RFC 1348 */
|
||||||
|
|
||||||
@ -75,6 +75,11 @@ fromwire_in_nsap_ptr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 23);
|
REQUIRE(type == 23);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: nsap-ptr_23.h,v 1.3 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: nsap-ptr_23.h,v 1.4 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 1348 */
|
/* RFC 1348 */
|
||||||
|
|
||||||
@ -75,6 +75,11 @@ fromwire_in_nsap_ptr(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 23);
|
REQUIRE(type == 23);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: px_26.c,v 1.3 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: px_26.c,v 1.4 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2163 */
|
/* RFC 2163 */
|
||||||
|
|
||||||
@ -101,6 +101,11 @@ fromwire_in_px(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 26);
|
REQUIRE(type == 26);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: px_26.h,v 1.3 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: px_26.h,v 1.4 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2163 */
|
/* RFC 2163 */
|
||||||
|
|
||||||
@ -101,6 +101,11 @@ fromwire_in_px(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 26);
|
REQUIRE(type == 26);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: srv_33.c,v 1.3 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: srv_33.c,v 1.4 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2052 bis */
|
/* RFC 2052 bis */
|
||||||
|
|
||||||
@ -108,6 +108,11 @@ fromwire_in_srv(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 33);
|
REQUIRE(type == 33);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: srv_33.h,v 1.3 1999/02/22 07:24:05 marka Exp $ */
|
/* $Id: srv_33.h,v 1.4 1999/02/24 06:31:35 marka Exp $ */
|
||||||
|
|
||||||
/* RFC 2052 bis */
|
/* RFC 2052 bis */
|
||||||
|
|
||||||
@ -108,6 +108,11 @@ fromwire_in_srv(dns_rdataclass_t class, dns_rdatatype_t type,
|
|||||||
|
|
||||||
REQUIRE(type == 33);
|
REQUIRE(type == 33);
|
||||||
REQUIRE(class == 1);
|
REQUIRE(class == 1);
|
||||||
|
|
||||||
|
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
|
||||||
|
else
|
||||||
|
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user