2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

implement singleton type checking

This commit is contained in:
Michael Graff
2000-04-14 18:36:45 +00:00
parent 77294b9d64
commit 3bb3b7ac46
4 changed files with 42 additions and 8 deletions

View File

@@ -1196,11 +1196,19 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
* append this rdata to that set. If we did not, we need
* to create a new rdatalist, store the important bits there,
* convert it to an rdataset, and link the latter to the name.
* Yuck.
* Yuck. When appending, make certain that the type isn't
* a singleton type, such as SOA or CNAME.
*
* XXXRTH Check for attempts to create multi-record RRsets
* for singleton RR types.
* Note that this check will be bypassed when preserving order,
* the opcode is an update, or the type search is skipped.
*/
if (result == ISC_R_SUCCESS) {
if (dns_rdatatype_issingleton(rdtype)) {
result = DNS_R_FORMERR;
goto cleanup;
}
}
if (result == ISC_R_NOTFOUND) {
rdataset = isc_mempool_get(msg->rdspool);
if (rdataset == NULL) {