static struct cc {
struct cc *next;
int rdclass;
- char classname[TYPECLASSBUF];
+ char classbuf[TYPECLASSBUF];
} *classes;
static struct tt {
struct tt *next;
int rdclass;
int type;
- char classname[TYPECLASSBUF];
- char typename[TYPECLASSBUF];
- char dirname[DIRNAMESIZE-30]; /* XXX Should be max path length */
+ char classbuf[TYPECLASSBUF];
+ char typebuf[TYPECLASSBUF];
+ char dirbuf[DIRNAMESIZE-30]; /* XXX Should be max path length */
} *types;
static struct ttnam {
- char typename[TYPECLASSBUF];
+ char typebuf[TYPECLASSBUF];
char macroname[TYPECLASSBUF];
char attr[ATTRIBUTESIZE];
unsigned int sorted;
fprintf(stdout,
"\tcase %d:%s %s_%s(%s); break;",
tt->type, result, function,
- funname(tt->typename, buf1), args);
+ funname(tt->typebuf, buf1), args);
else
fprintf(stdout,
"\t\tcase %d:%s %s_%s_%s(%s); break;",
tt->rdclass, result, function,
- funname(tt->classname, buf1),
- funname(tt->typename, buf2), args);
+ funname(tt->classbuf, buf1),
+ funname(tt->typebuf, buf2), args);
fputs(" \\\n", stdout);
lasttype = tt->type;
}
int i;
for (i = 0; i < TYPENAMES; i++) {
- if (typenames[i].typename[0] != 0 &&
+ if (typenames[i].typebuf[0] != 0 &&
typenames[i].type == type)
+ {
return (&typenames[i]);
+ }
}
return (NULL);
}
static void
-insert_into_typenames(int type, const char *typename, const char *attr) {
+insert_into_typenames(int type, const char *typebuf, const char *attr) {
struct ttnam *ttn = NULL;
size_t c;
int i, n;
char tmp[256];
- INSIST(strlen(typename) < TYPECLASSBUF);
+ INSIST(strlen(typebuf) < TYPECLASSBUF);
for (i = 0; i < TYPENAMES; i++) {
- if (typenames[i].typename[0] != 0 &&
+ if (typenames[i].typebuf[0] != 0 &&
typenames[i].type == type &&
- strcmp(typename, typenames[i].typename) != 0) {
+ strcmp(typebuf, typenames[i].typebuf) != 0)
+ {
fprintf(stderr,
"Error: type %d has two names: %s, %s\n",
- type, typenames[i].typename, typename);
+ type, typenames[i].typebuf, typebuf);
exit(1);
}
- if (typenames[i].typename[0] == 0 && ttn == NULL)
+ if (typenames[i].typebuf[0] == 0 && ttn == NULL) {
ttn = &typenames[i];
+ }
}
if (ttn == NULL) {
fprintf(stderr, "Error: typenames array too small\n");
}
/* XXXMUKS: This is redundant due to the INSIST above. */
- if (strlen(typename) > sizeof(ttn->typename) - 1) {
+ if (strlen(typebuf) > sizeof(ttn->typebuf) - 1) {
fprintf(stderr, "Error: type name %s is too long\n",
- typename);
+ typebuf);
exit(1);
}
- strncpy(ttn->typename, typename, sizeof(ttn->typename));
- ttn->typename[sizeof(ttn->typename) - 1] = '\0';
+ strncpy(ttn->typebuf, typebuf, sizeof(ttn->typebuf));
+ ttn->typebuf[sizeof(ttn->typebuf) - 1] = '\0';
- strncpy(ttn->macroname, ttn->typename, sizeof(ttn->macroname));
+ strncpy(ttn->macroname, ttn->typebuf, sizeof(ttn->macroname));
ttn->macroname[sizeof(ttn->macroname) - 1] = '\0';
ttn->type = type;
c = strlen(ttn->macroname);
while (c > 0) {
- if (ttn->macroname[c - 1] == '-')
+ if (ttn->macroname[c - 1] == '-') {
ttn->macroname[c - 1] = '_';
+ }
c--;
}
if (strlen(attr) > sizeof(ttn->attr) - 1) {
fprintf(stderr, "Error: attr (%s) [name %s] is too long\n",
- attr, typename);
+ attr, typebuf);
exit(1);
}
ttn->attr[sizeof(ttn->attr) - 1] = '\0';
ttn->sorted = 0;
- if (maxtype < type)
+ if (maxtype < type) {
maxtype = type;
+ }
}
static void
-add(int rdclass, const char *classname, int type, const char *typename,
- const char *dirname)
+add(int rdclass, const char *classbuf, int type, const char *typebuf,
+ const char *dirbuf)
{
struct tt *newtt = (struct tt *)malloc(sizeof(*newtt));
struct tt *tt, *oldtt;
struct cc *newcc;
struct cc *cc, *oldcc;
- INSIST(strlen(typename) < TYPECLASSBUF);
- INSIST(strlen(classname) < TYPECLASSBUF);
- INSIST(strlen(dirname) < DIRNAMESIZE);
+ INSIST(strlen(typebuf) < TYPECLASSBUF);
+ INSIST(strlen(classbuf) < TYPECLASSBUF);
+ INSIST(strlen(dirbuf) < DIRNAMESIZE);
- insert_into_typenames(type, typename, NULL);
+ insert_into_typenames(type, typebuf, NULL);
if (newtt == NULL) {
fprintf(stderr, "malloc() failed\n");
newtt->rdclass = rdclass;
newtt->type = type;
- strncpy(newtt->classname, classname, sizeof(newtt->classname));
- newtt->classname[sizeof(newtt->classname) - 1] = '\0';
+ strncpy(newtt->classbuf, classbuf, sizeof(newtt->classbuf));
+ newtt->classbuf[sizeof(newtt->classbuf) - 1] = '\0';
- strncpy(newtt->typename, typename, sizeof(newtt->typename));
- newtt->typename[sizeof(newtt->typename) - 1] = '\0';
+ strncpy(newtt->typebuf, typebuf, sizeof(newtt->typebuf));
+ newtt->typebuf[sizeof(newtt->typebuf) - 1] = '\0';
- if (strncmp(dirname, "./", 2) == 0)
- dirname += 2;
- strncpy(newtt->dirname, dirname, sizeof(newtt->dirname));
- newtt->dirname[sizeof(newtt->dirname) - 1] = '\0';
+ if (strncmp(dirbuf, "./", 2) == 0) {
+ dirbuf += 2;
+ }
+ strncpy(newtt->dirbuf, dirbuf, sizeof(newtt->dirbuf));
+ newtt->dirbuf[sizeof(newtt->dirbuf) - 1] = '\0';
tt = types;
oldtt = NULL;
}
while ((tt != NULL) && (tt->type == type) && (tt->rdclass < rdclass)) {
- if (strcmp(tt->typename, typename) != 0)
+ if (strcmp(tt->typebuf, typebuf) != 0) {
exit(1);
+ }
oldtt = tt;
tt = tt->next;
}
- if ((tt != NULL) && (tt->type == type) && (tt->rdclass == rdclass))
+ if ((tt != NULL) && (tt->type == type) && (tt->rdclass == rdclass)) {
exit(1);
+ }
newtt->next = tt;
- if (oldtt != NULL)
+ if (oldtt != NULL) {
oldtt->next = newtt;
- else
+ } else {
types = newtt;
+ }
/*
* Do a class switch for this type.
*/
- if (rdclass == 0)
+ if (rdclass == 0) {
return;
+ }
newcc = (struct cc *)malloc(sizeof(*newcc));
if (newcc == NULL) {
exit(1);
}
newcc->rdclass = rdclass;
- strncpy(newcc->classname, classname, sizeof(newcc->classname));
- newcc->classname[sizeof(newcc->classname) - 1] = '\0';
+ strncpy(newcc->classbuf, classbuf, sizeof(newcc->classbuf));
+ newcc->classbuf[sizeof(newcc->classbuf) - 1] = '\0';
cc = classes;
oldcc = NULL;
}
newcc->next = cc;
- if (oldcc != NULL)
+ if (oldcc != NULL) {
oldcc->next = newcc;
- else
+ } else {
classes = newcc;
+ }
}
static void
-sd(int rdclass, const char *classname, const char *dirname, char filetype) {
+sd(int rdclass, const char *classbuf, const char *dirbuf, char filetype) {
char buf[TYPECLASSLEN + sizeof("_65535.h")];
- char typename[TYPECLASSBUF];
+ char typebuf[TYPECLASSBUF];
int type, n;
isc_dir_t dir;
- if (!start_directory(dirname, &dir))
+ if (!start_directory(dirbuf, &dir)) {
return;
+ }
while (next_file(&dir)) {
- if (sscanf(dir.filename, TYPECLASSFMT, typename, &type) != 2)
+ if (sscanf(dir.filename, TYPECLASSFMT, typebuf, &type) != 2) {
continue;
- if ((type > 65535) || (type < 0))
+ }
+ if ((type > 65535) || (type < 0)) {
continue;
+ }
- n = snprintf(buf, sizeof(buf), "%s_%d.%c", typename,
+ n = snprintf(buf, sizeof(buf), "%s_%d.%c", typebuf,
type, filetype);
INSIST(n > 0 && (unsigned)n < sizeof(buf));
- if (strcmp(buf, dir.filename) != 0)
+ if (strcmp(buf, dir.filename) != 0) {
continue;
- add(rdclass, classname, type, typename, dirname);
+ }
+ add(rdclass, classbuf, type, typebuf, dirbuf);
}
end_directory(&dir);
char buf[DIRNAMESIZE]; /* XXX Should be max path length */
char srcdir[DIRNAMESIZE]; /* XXX Should be max path length */
int rdclass;
- char classname[TYPECLASSBUF];
+ char classbuf[TYPECLASSBUF];
struct tt *tt;
struct cc *cc;
struct ttnam *ttn, *ttn2;
case 's':
if (strlen(isc_commandline_argument) >
DIRNAMESIZE - 2 * TYPECLASSLEN -
- sizeof("/rdata/_65535_65535")) {
+ sizeof("/rdata/_65535_65535"))
+ {
fprintf(stderr, "\"%s\" too long\n",
isc_commandline_argument);
exit(1);
n = snprintf(buf, sizeof(buf), "%srdata", srcdir);
INSIST(n > 0 && (unsigned)n < sizeof(srcdir));
- if (!start_directory(buf, &dir))
+ if (!start_directory(buf, &dir)) {
exit(1);
+ }
while (next_file(&dir)) {
- if (sscanf(dir.filename, TYPECLASSFMT, classname,
+ if (sscanf(dir.filename, TYPECLASSFMT, classbuf,
&rdclass) != 2)
+ {
continue;
- if ((rdclass > 65535) || (rdclass < 0))
+ }
+ if ((rdclass > 65535) || (rdclass < 0)) {
continue;
+ }
n = snprintf(buf, sizeof(buf), "%srdata/%s_%d",
- srcdir, classname, rdclass);
+ srcdir, classbuf, rdclass);
INSIST(n > 0 && (unsigned)n < sizeof(buf));
- if (strcmp(buf + 6 + strlen(srcdir), dir.filename) != 0)
+ if (strcmp(buf + 6 + strlen(srcdir), dir.filename) != 0) {
continue;
- sd(rdclass, classname, buf, filetype);
+ }
+ sd(rdclass, classbuf, buf, filetype);
}
end_directory(&dir);
n = snprintf(buf, sizeof(buf), "%srdata/generic", srcdir);
snprintf(year, sizeof(year), "-2016");
}
- if (!depend)
+ if (!depend) {
fprintf(stdout, copyright, year);
+ }
if (code) {
fputs("#ifndef DNS_CODE_H\n", stdout);
fputs("#include <isc/result.h>\n\n", stdout);
fputs("#include <dns/name.h>\n\n", stdout);
- for (tt = types; tt != NULL; tt = tt->next)
+ for (tt = types; tt != NULL; tt = tt->next) {
fprintf(stdout, "#include \"%s/%s_%d.c\"\n",
- tt->dirname, tt->typename, tt->type);
+ tt->dirbuf, tt->typebuf, tt->type);
+ }
fputs("\n\n", stdout);
fprintf(stdout, "\tswitch (_hash) { \\\n");
for (i = 0; i <= maxtype; i++) {
ttn = find_typename(i);
- if (ttn == NULL)
+ if (ttn == NULL) {
continue;
+ }
/*
* Skip entries we already processed.
*/
- if (ttn->sorted != 0)
+ if (ttn->sorted != 0) {
continue;
+ }
- hash = HASH(ttn->typename);
+ hash = HASH(ttn->typebuf);
fprintf(stdout, "\t\tcase %u: \\\n", hash);
/*
*/
for (j = 0; j <= maxtype; j++) {
ttn2 = find_typename(j);
- if (ttn2 == NULL)
+ if (ttn2 == NULL) {
continue;
- if (hash == HASH(ttn2->typename)) {
- fprintf(stdout, "\t\t\tRDATATYPE_COMPARE"
- "(\"%s\", %d, "
- "_typename, _length, _typep); \\\n",
- ttn2->typename, ttn2->type);
+ }
+ if (hash == HASH(ttn2->typebuf)) {
+ fprintf(stdout, "\t\t\t"
+ "RDATATYPE_COMPARE"
+ "(\"%s\", %d, _typename, "
+ " _length, _typep); \\\n",
+ ttn2->typebuf, ttn2->type);
ttn2->sorted = 1;
}
}
fprintf(stdout, "\tswitch (type) { \\\n");
for (i = 0; i <= maxtype; i++) {
ttn = find_typename(i);
- if (ttn == NULL)
+ if (ttn == NULL) {
continue;
+ }
fprintf(stdout, "\tcase %d: return (%s); \\\n",
i, upper(ttn->attr));
}
fprintf(stdout, "\tswitch (type) { \\\n");
for (i = 0; i <= maxtype; i++) {
ttn = find_typename(i);
- if (ttn == NULL)
+ if (ttn == NULL) {
continue;
+ }
/*
* Remove KEYDATA (65533) from the type to memonic
* translation as it is internal use only. This
* stops the tools from displaying KEYDATA instead
* of TYPE65533.
*/
- if (i == 65533U)
+ if (i == 65533U) {
continue;
+ }
fprintf(stdout, "\tcase %d: return "
"(str_totext(\"%s\", target)); \\\n",
- i, upper(ttn->typename));
+ i, upper(ttn->typebuf));
}
fprintf(stdout, "\t}\n");
fprintf(stdout, "\tdns_rdatatype_none = 0,\n");
lasttype = 0;
- for (tt = types; tt != NULL; tt = tt->next)
- if (tt->type != lasttype)
+ for (tt = types; tt != NULL; tt = tt->next) {
+ if (tt->type != lasttype) {
fprintf(stdout,
"\tdns_rdatatype_%s = %d,\n",
- funname(tt->typename, buf1),
+ funname(tt->typebuf, buf1),
lasttype = tt->type);
+ }
+ }
fprintf(stdout, "\tdns_rdatatype_ixfr = 251,\n");
fprintf(stdout, "\tdns_rdatatype_axfr = 252,\n");
fprintf(stdout, "#define dns_rdatatype_none\t"
"((dns_rdatatype_t)dns_rdatatype_none)\n");
- for (tt = types; tt != NULL; tt = tt->next)
+ for (tt = types; tt != NULL; tt = tt->next) {
if (tt->type != lasttype) {
- s = funname(tt->typename, buf1);
+ s = funname(tt->typebuf, buf1);
fprintf(stdout,
"#define dns_rdatatype_%s\t%s"
"((dns_rdatatype_t)dns_rdatatype_%s)"
s, strlen(s) < 2U ? "\t" : "", s);
lasttype = tt->type;
}
+ }
fprintf(stdout, "#define dns_rdatatype_ixfr\t"
"((dns_rdatatype_t)dns_rdatatype_ixfr)\n");
} while (0)
for (cc = classes; cc != NULL; cc = cc->next) {
- if (cc->rdclass == 3)
+ if (cc->rdclass == 3) {
PRINTCLASS("chaos", 3);
- else if (cc->rdclass == 255)
+ } else if (cc->rdclass == 255) {
PRINTCLASS("none", 254);
- PRINTCLASS(cc->classname, cc->rdclass);
+ }
+ PRINTCLASS(cc->classbuf, cc->rdclass);
}
#undef PRINTCLASS
} else if (structs) {
if (prefix != NULL) {
if ((fd = fopen(prefix,"r")) != NULL) {
- while (fgets(buf, sizeof(buf), fd) != NULL)
+ while (fgets(buf, sizeof(buf), fd) != NULL) {
fputs(buf, stdout);
+ }
fclose(fd);
}
}
for (tt = types; tt != NULL; tt = tt->next) {
snprintf(buf, sizeof(buf), "%s/%s_%d.h",
- tt->dirname, tt->typename, tt->type);
+ tt->dirbuf, tt->typebuf, tt->type);
if ((fd = fopen(buf,"r")) != NULL) {
- while (fgets(buf, sizeof(buf), fd) != NULL)
+ while (fgets(buf, sizeof(buf), fd) != NULL) {
fputs(buf, stdout);
+ }
fclose(fd);
}
}
if (suffix != NULL) {
if ((fd = fopen(suffix,"r")) != NULL) {
- while (fgets(buf, sizeof(buf), fd) != NULL)
+ while (fgets(buf, sizeof(buf), fd) != NULL) {
fputs(buf, stdout);
+ }
fclose(fd);
}
}
} else if (depend) {
- for (tt = types; tt != NULL; tt = tt->next)
+ for (tt = types; tt != NULL; tt = tt->next) {
fprintf(stdout, "%s:\t%s/%s_%d.h\n", file,
- tt->dirname, tt->typename, tt->type);
+ tt->dirbuf, tt->typebuf, tt->type);
+ }
}
- if (ferror(stdout) != 0)
+ if (ferror(stdout) != 0) {
exit(1);
+ }
return (0);
}
char cname_buf[DNS_NAME_FORMATSIZE] = { 0 };
char p_name_buf[DNS_NAME_FORMATSIZE];
char qname_buf[DNS_NAME_FORMATSIZE];
- char classname[DNS_RDATACLASS_FORMATSIZE];
- char typename[DNS_RDATATYPE_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
const char *s1 = cname_buf, *s2 = cname_buf;
dns_rdataset_t *rdataset;
dns_rpz_st_t *st;
*/
rdataset = ISC_LIST_HEAD(client->query.origqname->list);
INSIST(rdataset != NULL);
- dns_rdataclass_format(rdataset->rdclass, classname, sizeof(classname));
- dns_rdatatype_format(rdataset->type, typename, sizeof(typename));
+ dns_rdataclass_format(rdataset->rdclass, classbuf, sizeof(classbuf));
+ dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
ns_client_log(client, DNS_LOGCATEGORY_RPZ, NS_LOGMODULE_QUERY,
DNS_RPZ_INFO_LEVEL,
"%srpz %s %s rewrite %s/%s/%s via %s%s%s%s",
disabled ? "disabled " : "",
dns_rpz_type2str(type), dns_rpz_policy2str(policy),
- qname_buf, typename, classname,
+ qname_buf, typebuf, classbuf,
p_name_buf, s1, cname_buf, s2);
}
qctx->qtype, false))
{
char namebuf[DNS_NAME_FORMATSIZE];
- char typename[DNS_RDATATYPE_FORMATSIZE];
- char classname[DNS_RDATACLASS_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
dns_name_format(qctx->client->query.qname,
namebuf, sizeof(namebuf));
- dns_rdatatype_format(qctx->qtype, typename, sizeof(typename));
+ dns_rdatatype_format(qctx->qtype, typebuf, sizeof(typebuf));
dns_rdataclass_format(qctx->client->message->rdclass,
- classname, sizeof(classname));
+ classbuf, sizeof(classbuf));
ns_client_log(qctx->client, DNS_LOGCATEGORY_SECURITY,
NS_LOGMODULE_QUERY, ISC_LOG_ERROR,
"check-names failure %s/%s/%s", namebuf,
- typename, classname);
+ typebuf, classbuf);
QUERY_ERROR(qctx, DNS_R_REFUSED);
return (query_done(qctx));
}
{
if (isc_log_wouldlog(ns_lctx, ISC_LOG_DEBUG(1))) {
char namebuf[DNS_NAME_FORMATSIZE];
- char typename[DNS_RDATATYPE_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
dns_name_format(qctx->client->query.qname,
namebuf, sizeof(namebuf));
- dns_rdatatype_format(qctx->qtype, typename,
- sizeof(typename));
+ dns_rdatatype_format(qctx->qtype, typebuf,
+ sizeof(typebuf));
ns_client_log(qctx->client,
NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_QUERY,
ISC_LOG_DEBUG(1),
"servfail cache hit %s/%s (%s)",
- namebuf, typename,
+ namebuf, typebuf,
((flags & NS_FAILCACHE_CD) != 0)
? "CD=1"
: "CD=0");
log_tat(ns_client_t *client) {
char namebuf[DNS_NAME_FORMATSIZE];
char clientbuf[ISC_NETADDR_FORMATSIZE];
- char classname[DNS_RDATACLASS_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
isc_netaddr_t netaddr;
char *tags = NULL;
size_t taglen = 0;
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
isc_netaddr_format(&netaddr, clientbuf, sizeof(clientbuf));
- dns_rdataclass_format(client->view->rdclass, classname,
- sizeof(classname));
+ dns_rdataclass_format(client->view->rdclass, classbuf,
+ sizeof(classbuf));
if (client->query.qtype == dns_rdatatype_dnskey) {
uint16_t keytags = client->keytag_len / 2;
isc_log_write(ns_lctx, NS_LOGCATEGORY_TAT, NS_LOGMODULE_QUERY,
ISC_LOG_INFO, "trust-anchor-telemetry '%s/%s' from %s%s",
- namebuf, classname, clientbuf, tags != NULL? tags : "");
+ namebuf, classbuf, clientbuf, tags != NULL? tags : "");
if (tags != NULL) {
isc_mem_put(client->mctx, tags, taglen);
}
static inline void
log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
char namebuf[DNS_NAME_FORMATSIZE];
- char typename[DNS_RDATATYPE_FORMATSIZE];
- char classname[DNS_RDATACLASS_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
char onbuf[ISC_NETADDR_FORMATSIZE];
char ecsbuf[DNS_ECS_FORMATSIZE + sizeof(" [ECS ]") - 1] = { 0 };
char ednsbuf[sizeof("E(65535)")] = { 0 };
rdataset = ISC_LIST_HEAD(client->query.qname->list);
INSIST(rdataset != NULL);
dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
- dns_rdataclass_format(rdataset->rdclass, classname, sizeof(classname));
- dns_rdatatype_format(rdataset->type, typename, sizeof(typename));
+ dns_rdataclass_format(rdataset->rdclass, classbuf, sizeof(classbuf));
+ dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
isc_netaddr_format(&client->destaddr, onbuf, sizeof(onbuf));
if (client->ednsversion >= 0)
ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
level, "query: %s %s %s %s%s%s%s%s%s%s (%s)%s",
- namebuf, classname, typename,
+ namebuf, classbuf, typebuf,
WANTRECURSION(client) ? "+" : "-",
(client->signer != NULL) ? "S" : "", ednsbuf,
TCP(client) ? "T" : "",
static inline void
log_queryerror(ns_client_t *client, isc_result_t result, int line, int level) {
char namebuf[DNS_NAME_FORMATSIZE];
- char typename[DNS_RDATATYPE_FORMATSIZE];
- char classname[DNS_RDATACLASS_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
const char *namep, *typep, *classp, *sep1, *sep2;
dns_rdataset_t *rdataset;
rdataset = ISC_LIST_HEAD(client->query.origqname->list);
if (rdataset != NULL) {
- dns_rdataclass_format(rdataset->rdclass, classname,
- sizeof(classname));
- classp = classname;
- dns_rdatatype_format(rdataset->type, typename,
- sizeof(typename));
- typep = typename;
+ dns_rdataclass_format(rdataset->rdclass, classbuf,
+ sizeof(classbuf));
+ classp = classbuf;
+ dns_rdatatype_format(rdataset->type, typebuf,
+ sizeof(typebuf));
+ typep = typebuf;
sep2 = "/";
}
}