mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +00:00
fix AMTRELAY name
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -2,7 +2,7 @@
|
|||||||
names specified on the command line without
|
names specified on the command line without
|
||||||
trailing dots. [GL !1478]
|
trailing dots. [GL !1478]
|
||||||
|
|
||||||
5158. [protocol] Add support for ATMRELAY and ZONEMD. [GL #867]
|
5158. [protocol] Add support for AMTRELAY and ZONEMD. [GL #867]
|
||||||
|
|
||||||
5157. [bug] Nslookup now errors out if there are extra command
|
5157. [bug] Nslookup now errors out if there are extra command
|
||||||
line arguments. [GL #207]
|
line arguments. [GL #207]
|
||||||
|
@@ -463,12 +463,12 @@ doa01 DOA ( 1234567890 1234567890 1 "image/gif"
|
|||||||
doa02 DOA 0 1 2 "" aHR0cHM6Ly93d3cuaXNjLm9yZy8=
|
doa02 DOA 0 1 2 "" aHR0cHM6Ly93d3cuaXNjLm9yZy8=
|
||||||
|
|
||||||
; type 260
|
; type 260
|
||||||
atmrelay01 ATMRELAY 0 0 0
|
amtrelay01 AMTRELAY 0 0 0
|
||||||
atmrelay02 ATMRELAY 0 1 0
|
amtrelay02 AMTRELAY 0 1 0
|
||||||
atmrelay03 ATMRELAY 0 0 1 0.0.0.0
|
amtrelay03 AMTRELAY 0 0 1 0.0.0.0
|
||||||
atmrelay04 ATMRELAY 0 0 2 ::
|
amtrelay04 AMTRELAY 0 0 2 ::
|
||||||
atmrelay05 ATMRELAY 0 0 3 example.net.
|
amtrelay05 AMTRELAY 0 0 3 example.net.
|
||||||
atmrelay06 ATMRELAY \# 2 0004
|
amtrelay06 AMTRELAY \# 2 0004
|
||||||
|
|
||||||
; type 261 -- 32767 (unassigned)
|
; type 261 -- 32767 (unassigned)
|
||||||
|
|
||||||
|
@@ -74,6 +74,6 @@ URI
|
|||||||
CAA
|
CAA
|
||||||
AVC
|
AVC
|
||||||
DOA
|
DOA
|
||||||
ATMRELAY
|
AMTRELAY
|
||||||
TA
|
TA
|
||||||
DLV
|
DLV
|
||||||
|
@@ -11,18 +11,18 @@ aaaa01.example. 3600 IN AAAA ::1
|
|||||||
aaaa02.example. 3600 IN AAAA fd92:7065:b8e:ffff::5
|
aaaa02.example. 3600 IN AAAA fd92:7065:b8e:ffff::5
|
||||||
afsdb01.example. 3600 IN AFSDB 0 hostname.example.
|
afsdb01.example. 3600 IN AFSDB 0 hostname.example.
|
||||||
afsdb02.example. 3600 IN AFSDB 65535 .
|
afsdb02.example. 3600 IN AFSDB 65535 .
|
||||||
|
amtrelay01.example. 3600 IN AMTRELAY 0 0 0
|
||||||
|
amtrelay02.example. 3600 IN AMTRELAY 0 1 0
|
||||||
|
amtrelay03.example. 3600 IN AMTRELAY 0 0 1 0.0.0.0
|
||||||
|
amtrelay04.example. 3600 IN AMTRELAY 0 0 2 ::
|
||||||
|
amtrelay05.example. 3600 IN AMTRELAY 0 0 3 example.net.
|
||||||
|
amtrelay06.example. 3600 IN AMTRELAY \# 2 0004
|
||||||
apl01.example. 3600 IN APL !1:10.0.0.1/32 1:10.0.0.0/24
|
apl01.example. 3600 IN APL !1:10.0.0.1/32 1:10.0.0.0/24
|
||||||
apl02.example. 3600 IN APL
|
apl02.example. 3600 IN APL
|
||||||
atma01.example. 3600 IN ATMA +61200000000
|
atma01.example. 3600 IN ATMA +61200000000
|
||||||
atma02.example. 3600 IN ATMA +61200000000
|
atma02.example. 3600 IN ATMA +61200000000
|
||||||
atma03.example. 3600 IN ATMA 1234567890abcdef
|
atma03.example. 3600 IN ATMA 1234567890abcdef
|
||||||
atma04.example. 3600 IN ATMA fedcba0987654321
|
atma04.example. 3600 IN ATMA fedcba0987654321
|
||||||
atmrelay01.example. 3600 IN ATMRELAY 0 0 0
|
|
||||||
atmrelay02.example. 3600 IN ATMRELAY 0 1 0
|
|
||||||
atmrelay03.example. 3600 IN ATMRELAY 0 0 1 0.0.0.0
|
|
||||||
atmrelay04.example. 3600 IN ATMRELAY 0 0 2 ::
|
|
||||||
atmrelay05.example. 3600 IN ATMRELAY 0 0 3 example.net.
|
|
||||||
atmrelay06.example. 3600 IN ATMRELAY \# 2 0004
|
|
||||||
avc.example. 3600 IN AVC "foo:bar"
|
avc.example. 3600 IN AVC "foo:bar"
|
||||||
caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev"
|
caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev"
|
||||||
caa02.example. 3600 IN CAA 128 tbs "Unknown"
|
caa02.example. 3600 IN CAA 128 tbs "Unknown"
|
||||||
|
@@ -11,18 +11,18 @@ aaaa01.example. 3600 IN AAAA ::1
|
|||||||
aaaa02.example. 3600 IN AAAA fd92:7065:b8e:ffff::5
|
aaaa02.example. 3600 IN AAAA fd92:7065:b8e:ffff::5
|
||||||
afsdb01.example. 3600 IN AFSDB 0 hostname.example.
|
afsdb01.example. 3600 IN AFSDB 0 hostname.example.
|
||||||
afsdb02.example. 3600 IN AFSDB 65535 .
|
afsdb02.example. 3600 IN AFSDB 65535 .
|
||||||
|
amtrelay01.example. 3600 IN AMTRELAY 0 0 0
|
||||||
|
amtrelay02.example. 3600 IN AMTRELAY 0 1 0
|
||||||
|
amtrelay03.example. 3600 IN AMTRELAY 0 0 1 0.0.0.1
|
||||||
|
amtrelay04.example. 3600 IN AMTRELAY 0 0 2 ::
|
||||||
|
amtrelay05.example. 3600 IN AMTRELAY 0 0 3 example.net.
|
||||||
|
amtrelay06.example. 3600 IN AMTRELAY \# 2 0004
|
||||||
apl01.example. 3600 IN APL !1:10.0.0.1/32 1:10.0.0.1/24
|
apl01.example. 3600 IN APL !1:10.0.0.1/32 1:10.0.0.1/24
|
||||||
apl02.example. 3600 IN APL
|
apl02.example. 3600 IN APL
|
||||||
atma01.example. 3600 IN ATMA +61200000000
|
atma01.example. 3600 IN ATMA +61200000000
|
||||||
atma02.example. 3600 IN ATMA +61200000000
|
atma02.example. 3600 IN ATMA +61200000000
|
||||||
atma03.example. 3600 IN ATMA 1234567890abcdef
|
atma03.example. 3600 IN ATMA 1234567890abcdef
|
||||||
atma04.example. 3600 IN ATMA fedcba0987654321
|
atma04.example. 3600 IN ATMA fedcba0987654321
|
||||||
atmrelay01.example. 3600 IN ATMRELAY 0 0 0
|
|
||||||
atmrelay02.example. 3600 IN ATMRELAY 0 1 0
|
|
||||||
atmrelay03.example. 3600 IN ATMRELAY 0 0 1 0.0.0.1
|
|
||||||
atmrelay04.example. 3600 IN ATMRELAY 0 0 2 ::
|
|
||||||
atmrelay05.example. 3600 IN ATMRELAY 0 0 3 example.net.
|
|
||||||
atmrelay06.example. 3600 IN ATMRELAY \# 2 0004
|
|
||||||
avc.example. 3600 IN AVC "foo:bar"
|
avc.example. 3600 IN AVC "foo:bar"
|
||||||
caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev"
|
caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev"
|
||||||
caa02.example. 3600 IN CAA 128 tbs "Unknown"
|
caa02.example. 3600 IN CAA 128 tbs "Unknown"
|
||||||
|
@@ -10,17 +10,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef RDATA_GENERIC_ATMRELAY_260_C
|
#ifndef RDATA_GENERIC_AMTRELAY_260_C
|
||||||
#define RDATA_GENERIC_ATMRELAY_260_C
|
#define RDATA_GENERIC_AMTRELAY_260_C
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <isc/net.h>
|
#include <isc/net.h>
|
||||||
|
|
||||||
#define RRTYPE_ATMRELAY_ATTRIBUTES (0)
|
#define RRTYPE_AMTRELAY_ATTRIBUTES (0)
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
fromtext_atmrelay(ARGS_FROMTEXT) {
|
fromtext_amtrelay(ARGS_FROMTEXT) {
|
||||||
isc_token_t token;
|
isc_token_t token;
|
||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
isc_buffer_t buffer;
|
isc_buffer_t buffer;
|
||||||
@@ -30,7 +30,7 @@ fromtext_atmrelay(ARGS_FROMTEXT) {
|
|||||||
unsigned char addr6[16];
|
unsigned char addr6[16];
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
|
|
||||||
REQUIRE(type == dns_rdatatype_atmrelay);
|
REQUIRE(type == dns_rdatatype_amtrelay);
|
||||||
|
|
||||||
UNUSED(type);
|
UNUSED(type);
|
||||||
UNUSED(rdclass);
|
UNUSED(rdclass);
|
||||||
@@ -120,7 +120,7 @@ fromtext_atmrelay(ARGS_FROMTEXT) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
totext_atmrelay(ARGS_TOTEXT) {
|
totext_amtrelay(ARGS_TOTEXT) {
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
char buf[sizeof("0 255 ")];
|
char buf[sizeof("0 255 ")];
|
||||||
@@ -131,7 +131,7 @@ totext_atmrelay(ARGS_TOTEXT) {
|
|||||||
|
|
||||||
UNUSED(tctx);
|
UNUSED(tctx);
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||||
REQUIRE(rdata->length >= 2);
|
REQUIRE(rdata->length >= 2);
|
||||||
|
|
||||||
if ((rdata->data[1] & 0x7f) > 3U)
|
if ((rdata->data[1] & 0x7f) > 3U)
|
||||||
@@ -182,11 +182,11 @@ totext_atmrelay(ARGS_TOTEXT) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
fromwire_atmrelay(ARGS_FROMWIRE) {
|
fromwire_amtrelay(ARGS_FROMWIRE) {
|
||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
|
|
||||||
REQUIRE(type == dns_rdatatype_atmrelay);
|
REQUIRE(type == dns_rdatatype_amtrelay);
|
||||||
|
|
||||||
UNUSED(type);
|
UNUSED(type);
|
||||||
UNUSED(rdclass);
|
UNUSED(rdclass);
|
||||||
@@ -233,10 +233,10 @@ fromwire_atmrelay(ARGS_FROMWIRE) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
towire_atmrelay(ARGS_TOWIRE) {
|
towire_amtrelay(ARGS_TOWIRE) {
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||||
REQUIRE(rdata->length != 0);
|
REQUIRE(rdata->length != 0);
|
||||||
|
|
||||||
UNUSED(cctx);
|
UNUSED(cctx);
|
||||||
@@ -246,13 +246,13 @@ towire_atmrelay(ARGS_TOWIRE) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
compare_atmrelay(ARGS_COMPARE) {
|
compare_amtrelay(ARGS_COMPARE) {
|
||||||
isc_region_t region1;
|
isc_region_t region1;
|
||||||
isc_region_t region2;
|
isc_region_t region2;
|
||||||
|
|
||||||
REQUIRE(rdata1->type == rdata2->type);
|
REQUIRE(rdata1->type == rdata2->type);
|
||||||
REQUIRE(rdata1->rdclass == rdata2->rdclass);
|
REQUIRE(rdata1->rdclass == rdata2->rdclass);
|
||||||
REQUIRE(rdata1->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata1->type == dns_rdatatype_amtrelay);
|
||||||
REQUIRE(rdata1->length >= 2);
|
REQUIRE(rdata1->length >= 2);
|
||||||
REQUIRE(rdata2->length >= 2);
|
REQUIRE(rdata2->length >= 2);
|
||||||
|
|
||||||
@@ -263,132 +263,132 @@ compare_atmrelay(ARGS_COMPARE) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
fromstruct_atmrelay(ARGS_FROMSTRUCT) {
|
fromstruct_amtrelay(ARGS_FROMSTRUCT) {
|
||||||
dns_rdata_atmrelay_t *atmrelay = source;
|
dns_rdata_amtrelay_t *amtrelay = source;
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
uint32_t n;
|
uint32_t n;
|
||||||
|
|
||||||
REQUIRE(type == dns_rdatatype_atmrelay);
|
REQUIRE(type == dns_rdatatype_amtrelay);
|
||||||
REQUIRE(source != NULL);
|
REQUIRE(source != NULL);
|
||||||
REQUIRE(atmrelay->common.rdtype == type);
|
REQUIRE(amtrelay->common.rdtype == type);
|
||||||
REQUIRE(atmrelay->common.rdclass == rdclass);
|
REQUIRE(amtrelay->common.rdclass == rdclass);
|
||||||
|
|
||||||
UNUSED(type);
|
UNUSED(type);
|
||||||
UNUSED(rdclass);
|
UNUSED(rdclass);
|
||||||
|
|
||||||
RETERR(uint8_tobuffer(atmrelay->precedence, target));
|
RETERR(uint8_tobuffer(amtrelay->precedence, target));
|
||||||
n = (atmrelay->discovery ? 0x80 : 0) | atmrelay->gateway_type;
|
n = (amtrelay->discovery ? 0x80 : 0) | amtrelay->gateway_type;
|
||||||
RETERR(uint8_tobuffer(n, target));
|
RETERR(uint8_tobuffer(n, target));
|
||||||
|
|
||||||
switch (atmrelay->gateway_type) {
|
switch (amtrelay->gateway_type) {
|
||||||
case 0:
|
case 0:
|
||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
n = ntohl(atmrelay->in_addr.s_addr);
|
n = ntohl(amtrelay->in_addr.s_addr);
|
||||||
return (uint32_tobuffer(n, target));
|
return (uint32_tobuffer(n, target));
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return (mem_tobuffer(target, atmrelay->in6_addr.s6_addr, 16));
|
return (mem_tobuffer(target, amtrelay->in6_addr.s6_addr, 16));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
dns_name_toregion(&atmrelay->gateway, ®ion);
|
dns_name_toregion(&amtrelay->gateway, ®ion);
|
||||||
return (isc_buffer_copyregion(target, ®ion));
|
return (isc_buffer_copyregion(target, ®ion));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return (mem_tobuffer(target, atmrelay->data, atmrelay->length));
|
return (mem_tobuffer(target, amtrelay->data, amtrelay->length));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
tostruct_atmrelay(ARGS_TOSTRUCT) {
|
tostruct_amtrelay(ARGS_TOSTRUCT) {
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
dns_rdata_atmrelay_t *atmrelay = target;
|
dns_rdata_amtrelay_t *amtrelay = target;
|
||||||
dns_name_t name;
|
dns_name_t name;
|
||||||
uint32_t n;
|
uint32_t n;
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||||
REQUIRE(target != NULL);
|
REQUIRE(target != NULL);
|
||||||
REQUIRE(rdata->length >= 2);
|
REQUIRE(rdata->length >= 2);
|
||||||
|
|
||||||
atmrelay->common.rdclass = rdata->rdclass;
|
amtrelay->common.rdclass = rdata->rdclass;
|
||||||
atmrelay->common.rdtype = rdata->type;
|
amtrelay->common.rdtype = rdata->type;
|
||||||
ISC_LINK_INIT(&atmrelay->common, link);
|
ISC_LINK_INIT(&amtrelay->common, link);
|
||||||
|
|
||||||
dns_name_init(&atmrelay->gateway, NULL);
|
dns_name_init(&amtrelay->gateway, NULL);
|
||||||
atmrelay->data = NULL;
|
amtrelay->data = NULL;
|
||||||
|
|
||||||
dns_name_init(&name, NULL);
|
dns_name_init(&name, NULL);
|
||||||
dns_rdata_toregion(rdata, ®ion);
|
dns_rdata_toregion(rdata, ®ion);
|
||||||
|
|
||||||
atmrelay->precedence = uint8_fromregion(®ion);
|
amtrelay->precedence = uint8_fromregion(®ion);
|
||||||
isc_region_consume(®ion, 1);
|
isc_region_consume(®ion, 1);
|
||||||
|
|
||||||
atmrelay->gateway_type = uint8_fromregion(®ion);
|
amtrelay->gateway_type = uint8_fromregion(®ion);
|
||||||
atmrelay->discovery = (atmrelay->gateway_type & 0x80) != 0;
|
amtrelay->discovery = (amtrelay->gateway_type & 0x80) != 0;
|
||||||
atmrelay->gateway_type &= 0x7f;
|
amtrelay->gateway_type &= 0x7f;
|
||||||
isc_region_consume(®ion, 1);
|
isc_region_consume(®ion, 1);
|
||||||
|
|
||||||
switch (atmrelay->gateway_type) {
|
switch (amtrelay->gateway_type) {
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
n = uint32_fromregion(®ion);
|
n = uint32_fromregion(®ion);
|
||||||
atmrelay->in_addr.s_addr = htonl(n);
|
amtrelay->in_addr.s_addr = htonl(n);
|
||||||
isc_region_consume(®ion, 4);
|
isc_region_consume(®ion, 4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
memmove(atmrelay->in6_addr.s6_addr, region.base, 16);
|
memmove(amtrelay->in6_addr.s6_addr, region.base, 16);
|
||||||
isc_region_consume(®ion, 16);
|
isc_region_consume(®ion, 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
dns_name_fromregion(&name, ®ion);
|
dns_name_fromregion(&name, ®ion);
|
||||||
RETERR(name_duporclone(&name, mctx, &atmrelay->gateway));
|
RETERR(name_duporclone(&name, mctx, &amtrelay->gateway));
|
||||||
isc_region_consume(®ion, name_length(&name));
|
isc_region_consume(®ion, name_length(&name));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (region.length != 0) {
|
if (region.length != 0) {
|
||||||
atmrelay->data = mem_maybedup(mctx, region.base,
|
amtrelay->data = mem_maybedup(mctx, region.base,
|
||||||
region.length);
|
region.length);
|
||||||
if (atmrelay->data == NULL) {
|
if (amtrelay->data == NULL) {
|
||||||
return (ISC_R_NOMEMORY);
|
return (ISC_R_NOMEMORY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
atmrelay->length = region.length;
|
amtrelay->length = region.length;
|
||||||
}
|
}
|
||||||
atmrelay->mctx = mctx;
|
amtrelay->mctx = mctx;
|
||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
freestruct_atmrelay(ARGS_FREESTRUCT) {
|
freestruct_amtrelay(ARGS_FREESTRUCT) {
|
||||||
dns_rdata_atmrelay_t *atmrelay = source;
|
dns_rdata_amtrelay_t *amtrelay = source;
|
||||||
|
|
||||||
REQUIRE(source != NULL);
|
REQUIRE(source != NULL);
|
||||||
REQUIRE(atmrelay->common.rdtype == dns_rdatatype_atmrelay);
|
REQUIRE(amtrelay->common.rdtype == dns_rdatatype_amtrelay);
|
||||||
|
|
||||||
if (atmrelay->mctx == NULL)
|
if (amtrelay->mctx == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (atmrelay->gateway_type == 3)
|
if (amtrelay->gateway_type == 3)
|
||||||
dns_name_free(&atmrelay->gateway, atmrelay->mctx);
|
dns_name_free(&amtrelay->gateway, amtrelay->mctx);
|
||||||
|
|
||||||
if (atmrelay->data != NULL)
|
if (amtrelay->data != NULL)
|
||||||
isc_mem_free(atmrelay->mctx, atmrelay->data);
|
isc_mem_free(amtrelay->mctx, amtrelay->data);
|
||||||
|
|
||||||
atmrelay->mctx = NULL;
|
amtrelay->mctx = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
additionaldata_atmrelay(ARGS_ADDLDATA) {
|
additionaldata_amtrelay(ARGS_ADDLDATA) {
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||||
|
|
||||||
UNUSED(rdata);
|
UNUSED(rdata);
|
||||||
UNUSED(add);
|
UNUSED(add);
|
||||||
@@ -398,19 +398,19 @@ additionaldata_atmrelay(ARGS_ADDLDATA) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline isc_result_t
|
static inline isc_result_t
|
||||||
digest_atmrelay(ARGS_DIGEST) {
|
digest_amtrelay(ARGS_DIGEST) {
|
||||||
isc_region_t region;
|
isc_region_t region;
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||||
|
|
||||||
dns_rdata_toregion(rdata, ®ion);
|
dns_rdata_toregion(rdata, ®ion);
|
||||||
return ((digest)(arg, ®ion));
|
return ((digest)(arg, ®ion));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
checkowner_atmrelay(ARGS_CHECKOWNER) {
|
checkowner_amtrelay(ARGS_CHECKOWNER) {
|
||||||
|
|
||||||
REQUIRE(type == dns_rdatatype_atmrelay);
|
REQUIRE(type == dns_rdatatype_amtrelay);
|
||||||
|
|
||||||
UNUSED(name);
|
UNUSED(name);
|
||||||
UNUSED(type);
|
UNUSED(type);
|
||||||
@@ -421,9 +421,9 @@ checkowner_atmrelay(ARGS_CHECKOWNER) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
checknames_atmrelay(ARGS_CHECKNAMES) {
|
checknames_amtrelay(ARGS_CHECKNAMES) {
|
||||||
|
|
||||||
REQUIRE(rdata->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||||
|
|
||||||
UNUSED(rdata);
|
UNUSED(rdata);
|
||||||
UNUSED(owner);
|
UNUSED(owner);
|
||||||
@@ -433,7 +433,7 @@ checknames_atmrelay(ARGS_CHECKNAMES) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
casecompare_atmrelay(ARGS_COMPARE) {
|
casecompare_amtrelay(ARGS_COMPARE) {
|
||||||
isc_region_t region1;
|
isc_region_t region1;
|
||||||
isc_region_t region2;
|
isc_region_t region2;
|
||||||
dns_name_t name1;
|
dns_name_t name1;
|
||||||
@@ -441,7 +441,7 @@ casecompare_atmrelay(ARGS_COMPARE) {
|
|||||||
|
|
||||||
REQUIRE(rdata1->type == rdata2->type);
|
REQUIRE(rdata1->type == rdata2->type);
|
||||||
REQUIRE(rdata1->rdclass == rdata2->rdclass);
|
REQUIRE(rdata1->rdclass == rdata2->rdclass);
|
||||||
REQUIRE(rdata1->type == dns_rdatatype_atmrelay);
|
REQUIRE(rdata1->type == dns_rdatatype_amtrelay);
|
||||||
REQUIRE(rdata1->length >= 2);
|
REQUIRE(rdata1->length >= 2);
|
||||||
REQUIRE(rdata2->length >= 2);
|
REQUIRE(rdata2->length >= 2);
|
||||||
|
|
||||||
@@ -464,4 +464,4 @@ casecompare_atmrelay(ARGS_COMPARE) {
|
|||||||
return (dns_name_rdatacompare(&name1, &name2));
|
return (dns_name_rdatacompare(&name1, &name2));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* RDATA_GENERIC_ATMRELAY_260_C */
|
#endif /* RDATA_GENERIC_AMTRELAY_260_C */
|
@@ -10,10 +10,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef GENERIC_ATMRELAY_260_H
|
#ifndef GENERIC_AMTRELAY_260_H
|
||||||
#define GENERIC_ATMRELAY_260_H 1
|
#define GENERIC_AMTRELAY_260_H 1
|
||||||
|
|
||||||
typedef struct dns_rdata_atmrelay {
|
typedef struct dns_rdata_amtrelay {
|
||||||
dns_rdatacommon_t common;
|
dns_rdatacommon_t common;
|
||||||
isc_mem_t *mctx;
|
isc_mem_t *mctx;
|
||||||
uint8_t precedence;
|
uint8_t precedence;
|
||||||
@@ -24,6 +24,6 @@ typedef struct dns_rdata_atmrelay {
|
|||||||
dns_name_t gateway; /* gateway type 3 */
|
dns_name_t gateway; /* gateway type 3 */
|
||||||
unsigned char *data; /* gateway type > 3 */
|
unsigned char *data; /* gateway type > 3 */
|
||||||
uint16_t length;
|
uint16_t length;
|
||||||
} dns_rdata_atmrelay_t;
|
} dns_rdata_amtrelay_t;
|
||||||
|
|
||||||
#endif /* GENERIC_ATMRELAY_260_H */
|
#endif /* GENERIC_AMTRELAY_260_H */
|
@@ -563,9 +563,9 @@ atma(void **state) {
|
|||||||
dns_rdatatype_atma, sizeof(dns_rdata_in_atma_t));
|
dns_rdatatype_atma, sizeof(dns_rdata_in_atma_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ATMRELAY RDATA manipulations */
|
/* AMTRELAY RDATA manipulations */
|
||||||
static void
|
static void
|
||||||
atmrelay(void **state) {
|
amtrelay(void **state) {
|
||||||
text_ok_t text_ok[] = {
|
text_ok_t text_ok[] = {
|
||||||
TEXT_INVALID(""),
|
TEXT_INVALID(""),
|
||||||
TEXT_INVALID("0"),
|
TEXT_INVALID("0"),
|
||||||
@@ -653,7 +653,7 @@ atmrelay(void **state) {
|
|||||||
UNUSED(state);
|
UNUSED(state);
|
||||||
|
|
||||||
check_rdata(text_ok, wire_ok, NULL, false, dns_rdataclass_in,
|
check_rdata(text_ok, wire_ok, NULL, false, dns_rdataclass_in,
|
||||||
dns_rdatatype_atmrelay, sizeof(dns_rdata_atmrelay_t));
|
dns_rdatatype_amtrelay, sizeof(dns_rdata_amtrelay_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1807,9 +1807,9 @@ iszonecutauth(void **state) {
|
|||||||
int
|
int
|
||||||
main(void) {
|
main(void) {
|
||||||
const struct CMUnitTest tests[] = {
|
const struct CMUnitTest tests[] = {
|
||||||
|
cmocka_unit_test_setup_teardown(amtrelay, _setup, _teardown),
|
||||||
cmocka_unit_test_setup_teardown(apl, _setup, _teardown),
|
cmocka_unit_test_setup_teardown(apl, _setup, _teardown),
|
||||||
cmocka_unit_test_setup_teardown(atma, _setup, _teardown),
|
cmocka_unit_test_setup_teardown(atma, _setup, _teardown),
|
||||||
cmocka_unit_test_setup_teardown(atmrelay, _setup, _teardown),
|
|
||||||
cmocka_unit_test_setup_teardown(csync, _setup, _teardown),
|
cmocka_unit_test_setup_teardown(csync, _setup, _teardown),
|
||||||
cmocka_unit_test_setup_teardown(doa, _setup, _teardown),
|
cmocka_unit_test_setup_teardown(doa, _setup, _teardown),
|
||||||
cmocka_unit_test_setup_teardown(eid, _setup, _teardown),
|
cmocka_unit_test_setup_teardown(eid, _setup, _teardown),
|
||||||
|
@@ -1822,8 +1822,8 @@
|
|||||||
./lib/dns/rdata/ch_3/a_1.h C 2005,2007,2016,2018,2019
|
./lib/dns/rdata/ch_3/a_1.h C 2005,2007,2016,2018,2019
|
||||||
./lib/dns/rdata/generic/afsdb_18.c C 1999,2000,2001,2003,2004,2005,2007,2009,2014,2015,2016,2017,2018,2019
|
./lib/dns/rdata/generic/afsdb_18.c C 1999,2000,2001,2003,2004,2005,2007,2009,2014,2015,2016,2017,2018,2019
|
||||||
./lib/dns/rdata/generic/afsdb_18.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019
|
./lib/dns/rdata/generic/afsdb_18.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019
|
||||||
./lib/dns/rdata/generic/atmrelay_260.c C 2019
|
./lib/dns/rdata/generic/amtrelay_260.c C 2019
|
||||||
./lib/dns/rdata/generic/atmrelay_260.h C 2019
|
./lib/dns/rdata/generic/amtrelay_260.h C 2019
|
||||||
./lib/dns/rdata/generic/avc_258.c C 2016,2018,2019
|
./lib/dns/rdata/generic/avc_258.c C 2016,2018,2019
|
||||||
./lib/dns/rdata/generic/avc_258.h C 2016,2018,2019
|
./lib/dns/rdata/generic/avc_258.h C 2016,2018,2019
|
||||||
./lib/dns/rdata/generic/caa_257.c C 2014,2015,2016,2017,2018,2019
|
./lib/dns/rdata/generic/caa_257.c C 2014,2015,2016,2017,2018,2019
|
||||||
|
Reference in New Issue
Block a user