interface dnsp
{
typedef [enum16bit] enum {
- DNS_TYPE_ZERO = 0x0,
+ DNS_TYPE_TOMBSTONE = 0x0,
DNS_TYPE_A = 0x1,
DNS_TYPE_NS = 0x2,
DNS_TYPE_MD = 0x3,
} dnsp_srv;
typedef [nodiscriminant,gensize] union {
+ [case(DNS_TYPE_TOMBSTONE)] NTTIME timestamp;
[case(DNS_TYPE_A)] [flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
[case(DNS_TYPE_NS)] dnsp_name ns;
[case(DNS_TYPE_CNAME)] dnsp_name cname;
/*
see if a DNS type is single valued
*/
-static enum dns_record_type b9_dns_type(const char *type)
+static bool b9_dns_type(const char *type, enum dns_record_type *dtype)
{
int i;
for (i=0; i<ARRAY_SIZE(dns_typemap); i++) {
if (strcasecmp(dns_typemap[i].typestr, type) == 0) {
- return dns_typemap[i].dns_type;
+ *dtype = dns_typemap[i].dns_type;
+ return true;
}
}
- return DNS_TYPE_ZERO;
+ return false;
}
return ISC_R_FAILURE;
}
- dns_type = b9_dns_type(type);
- if (dns_type == DNS_TYPE_ZERO) {
+ if (!b9_dns_type(type, &dns_type)) {
state->log(ISC_LOG_INFO, "samba_dlz: bad dns type %s in delete", type);
return ISC_R_FAILURE;
}