Skip to content

Commit

Permalink
Added RESINFO draft RR type
Browse files Browse the repository at this point in the history
enable with: --enable-rrtype-resinfo
See https://datatracker.ietf.org/doc/draft-ietf-add-resolver-info
  • Loading branch information
wtoorop committed May 15, 2024
1 parent 34604e4 commit 2c7d392
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* Fix to compile DLLs, and pick out of the lib64 dir, and include
libssp-0.dll and ldns-config.
* bugfix #237: Resolver uses nameserver commented out in
/etc/resolv.conf
/etc/resolv.conf. Thanks grembo.
* Added RESINFO draft rrtype. Enable with --enable-rrtype-resinfo

1.8.3 2022-08-15
* bugfix #183: Assertion failure with OPT record without rdata.
Expand Down
17 changes: 13 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -715,12 +715,12 @@ case "$enable_rrtype_doa" in
no|*)
;;
esac
AC_ARG_ENABLE(rrtype-amtrelay, AS_HELP_STRING([--enable-rrtype-amtrelay],[Enable draft RR type AMTRELAY.]))
AC_ARG_ENABLE(rrtype-amtrelay, AS_HELP_STRING([--disable-rrtype-amtrelay],[Disable RR type AMTRELAY.]))
case "$enable_rrtype_amtrelay" in
yes)
AC_DEFINE_UNQUOTED([RRTYPE_AMTRELAY], [], [Define this to enable RR type AMTRELAY.])
no)
;;
no|*)
yes|*)
AC_DEFINE_UNQUOTED([RRTYPE_AMTRELAY], [], [Define this to enable RR type AMTRELAY.])
;;
esac
AC_ARG_ENABLE(rrtype-svcb-https, AS_HELP_STRING([--disable-rrtype-svcb-https],[Disable RR types SVCB and HTTPS.]))
Expand All @@ -731,6 +731,15 @@ case "$enable_rrtype_svcb_https" in
AC_DEFINE_UNQUOTED([RRTYPE_SVCB_HTTPS], [], [Define this to enable RR types SVCB and HTTPS.])
;;
esac
AC_ARG_ENABLE(rrtype-resinfo, AS_HELP_STRING([--enable-rrtype-resinfo],[Enable RR type RESINFO.]))
case "$enable_rrtype_resinfo" in
yes)
AC_DEFINE_UNQUOTED([RRTYPE_RESINFO], [], [Define this to enable RR type RESINFO.])
;;
no|*)
;;
esac


if echo "$tmp_LIBS" | grep "ws2_32" >/dev/null; then
if echo "$LIBSSL_LIBS" | grep "ws2_32" >/dev/null; then
Expand Down
13 changes: 8 additions & 5 deletions ldns/rr.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ enum ldns_enum_rr_type
LDNS_RR_TYPE_CDNSKEY = 60, /* RFC 7344 */
LDNS_RR_TYPE_OPENPGPKEY = 61, /* RFC 7929 */
LDNS_RR_TYPE_CSYNC = 62, /* RFC 7477 */
LDNS_RR_TYPE_ZONEMD = 63, /* draft-ietf-dnsop-dns-zone-digest */
LDNS_RR_TYPE_SVCB = 64, /* draft-ietf-dnsop-svcb-https */
LDNS_RR_TYPE_HTTPS = 65, /* draft-ietf-dnsop-svcb-https */
LDNS_RR_TYPE_ZONEMD = 63, /* RFC 8976 */
LDNS_RR_TYPE_SVCB = 64, /* RFC 9460 */
LDNS_RR_TYPE_HTTPS = 65, /* RFC 9460 */

LDNS_RR_TYPE_SPF = 99, /* RFC 4408 */

Expand Down Expand Up @@ -225,9 +225,12 @@ enum ldns_enum_rr_type
LDNS_RR_TYPE_AVC = 258, /* Cisco's DNS-AS RR, see www.dns-as.org */
LDNS_RR_TYPE_DOA = 259, /* draft-durand-doa-over-dns */

/** draft-ietf-mboned-driad-amt-discovery **/
/** RFC 8777 **/
LDNS_RR_TYPE_AMTRELAY = 260,

/** draft-ietf-add-resolver-info */
LDNS_RR_TYPE_RESINFO = 261,

/** DNSSEC Trust Authorities */
LDNS_RR_TYPE_TA = 32768,
/* RFC 4431, 5074, DNSSEC Lookaside Validation */
Expand All @@ -243,7 +246,7 @@ enum ldns_enum_rr_type
typedef enum ldns_enum_rr_type ldns_rr_type;

/* The first fields are contiguous and can be referenced instantly */
#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON (LDNS_RR_TYPE_AMTRELAY + 1)
#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON (LDNS_RR_TYPE_RESINFO + 1)

/**
* Resource Record
Expand Down
7 changes: 7 additions & 0 deletions rr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,13 @@ static ldns_rr_descriptor rdata_field_descriptors[] = {
#else
{LDNS_RR_TYPE_NULL, "TYPE260", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
#endif
#ifdef RRTYPE_RESINFO
/* 261 */
{LDNS_RR_TYPE_RESINFO, "RESINFO", 1, 0, NULL, LDNS_RDF_TYPE_STR, LDNS_RR_NO_COMPRESS, 0 },
#else
{LDNS_RR_TYPE_NULL, "TYPE261", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
#endif


/* split in array, no longer contiguous */

Expand Down

0 comments on commit 2c7d392

Please sign in to comment.