summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2016-04-26 12:15:08 +0200
committerWillem Toorop <willem@nlnetlabs.nl>2016-04-26 12:15:08 +0200
commit0f1d528ce1d1d57be92610a58065dcaf2c5bf82e (patch)
treee8b80ad776816af3711e1e7448eb679d44aa7474
parent2d6c9a5a4fc7bb21a0dfb8e1fc96bfdf3ed8b894 (diff)
downloadldns-0f1d528ce1d1d57be92610a58065dcaf2c5bf82e.tar.gz
AVC rrtype
-rw-r--r--configure.ac8
-rw-r--r--ldns/rr.h3
-rw-r--r--rr.c7
3 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 1d1f0e3a..7bc7b765 100644
--- a/configure.ac
+++ b/configure.ac
@@ -447,6 +447,14 @@ case "$enable_rrtype_ta" in
no|*)
;;
esac
+AC_ARG_ENABLE(rrtype-avc, AC_HELP_STRING([--enable-rrtype-avc], [Enable draft RR type avc.]))
+case "$enable_rrtype_avc" in
+ yes)
+ AC_DEFINE_UNQUOTED([RRTYPE_AVC], [], [Define this to enable RR type AVC.])
+ ;;
+ no|*)
+ ;;
+esac
AC_SUBST(LIBSSL_CPPFLAGS)
AC_SUBST(LIBSSL_LDFLAGS)
diff --git a/ldns/rr.h b/ldns/rr.h
index a3a79a0b..811efe74 100644
--- a/ldns/rr.h
+++ b/ldns/rr.h
@@ -37,7 +37,7 @@ extern "C" {
#define LDNS_RR_OVERHEAD 10
/* The first fields are contiguous and can be referenced instantly */
-#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON 258
+#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON 259
@@ -223,6 +223,7 @@ enum ldns_enum_rr_type
LDNS_RR_TYPE_ANY = 255,
LDNS_RR_TYPE_URI = 256, /* RFC 7553 */
LDNS_RR_TYPE_CAA = 257, /* RFC 6844 */
+ LDNS_RR_TYPE_AVC = 258, /* Cisco's DNS-AS RR, see www.dns-as.org */
/** DNSSEC Trust Authorities */
LDNS_RR_TYPE_TA = 32768,
diff --git a/rr.c b/rr.c
index d239b02e..237ceae0 100644
--- a/rr.c
+++ b/rr.c
@@ -2407,6 +2407,13 @@ static ldns_rr_descriptor rdata_field_descriptors[] = {
/* 257 */
{LDNS_RR_TYPE_CAA, "CAA", 3, 3, type_caa_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
+#ifdef RRTYPE_AVC
+ /* 258 */
+ {LDNS_RR_TYPE_AVC, "AVC", 1, 0, NULL, LDNS_RDF_TYPE_STR, LDNS_RR_NO_COMPRESS, 0 },
+#else
+{LDNS_RR_TYPE_NULL, "TYPE258", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
+#endif
+
/* split in array, no longer contiguous */
#ifdef RRTYPE_TA