mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
don't use 'typename' as it is reserved in C++
This commit is contained in:
@@ -1304,8 +1304,8 @@ rpz_log_rewrite(ns_client_t *client, bool disabled,
|
||||
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;
|
||||
@@ -1347,15 +1347,15 @@ rpz_log_rewrite(ns_client_t *client, bool disabled,
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -5273,18 +5273,18 @@ ns__query_start(query_ctx_t *qctx) {
|
||||
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));
|
||||
}
|
||||
@@ -6114,18 +6114,18 @@ ns__query_sfcache(query_ctx_t *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");
|
||||
@@ -10789,7 +10789,7 @@ static inline void
|
||||
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;
|
||||
@@ -10809,8 +10809,8 @@ log_tat(ns_client_t *client) {
|
||||
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;
|
||||
@@ -10839,7 +10839,7 @@ log_tat(ns_client_t *client) {
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -10848,8 +10848,8 @@ log_tat(ns_client_t *client) {
|
||||
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 };
|
||||
@@ -10862,8 +10862,8 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
||||
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)
|
||||
@@ -10878,7 +10878,7 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
||||
|
||||
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" : "",
|
||||
@@ -10891,8 +10891,8 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
||||
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;
|
||||
|
||||
@@ -10914,12 +10914,12 @@ log_queryerror(ns_client_t *client, isc_result_t result, int line, int level) {
|
||||
|
||||
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 = "/";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user