summaryrefslogtreecommitdiff
path: root/rr.c
diff options
context:
space:
mode:
authorWillem Toorop <willem@NLnetLabs.nl>2011-08-24 21:46:20 +0200
committerWillem Toorop <willem@NLnetLabs.nl>2011-08-24 21:46:20 +0200
commit1a3831cf6878b335052bb809fcca6623792e4f83 (patch)
tree5ecb9a413095ac2ea281a8c31728a669a3370955 /rr.c
parent1ebb52650804dbf8df911502f49361eb1365681d (diff)
downloadldns-1a3831cf6878b335052bb809fcca6623792e4f83.tar.gz
Fix minimum and maximum number of rdata fields in TSIG
Diffstat (limited to 'rr.c')
-rw-r--r--rr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/rr.c b/rr.c
index 672525e3..464a62c8 100644
--- a/rr.c
+++ b/rr.c
@@ -2244,7 +2244,11 @@ static ldns_rr_descriptor rdata_field_descriptors[] = {
{LDNS_RR_TYPE_NULL, "TYPE247", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
{LDNS_RR_TYPE_NULL, "TYPE248", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
{LDNS_RR_TYPE_NULL, "TYPE249", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
-{LDNS_RR_TYPE_TSIG, "TSIG", 8, 9, type_tsig_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
+/* LDNS_RDF_TYPE_INT16_DATA essentially takes two fields (length and data) and
+ * makes them into one. So, while in rfc 2845 is specified that a TSIG may have
+ * 8 or 9 rdata fields, by this implementation, the min/max are 7 each.
+ */
+{LDNS_RR_TYPE_TSIG, "TSIG", 7, 7, type_tsig_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 },
/* split in array, no longer contiguous */
{LDNS_RR_TYPE_DLV, "DLV", 4, 4, type_ds_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }
};