mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-04 13:42:04 -04:00
Re-split format strings
Re-split format strings that had been poorly split by multiple
clang-format runs using different versions of clang-format.
(cherry picked from commit a24d6e1654)
This commit is contained in:
parent
aa10ae45fd
commit
2f26d2fde7
1 changed files with 77 additions and 90 deletions
167
lib/ns/update.c
167
lib/ns/update.c
|
|
@ -1688,9 +1688,9 @@ send_update_event(ns_client_t *client, dns_zone_t *zone) {
|
|||
}
|
||||
|
||||
if (dns_zone_getupdatedisabled(zone)) {
|
||||
FAILC(DNS_R_REFUSED, "dynamic update temporarily disabled "
|
||||
"because the zone is frozen. Use "
|
||||
"'rndc thaw' to re-enable updates.");
|
||||
FAILC(DNS_R_REFUSED,
|
||||
"dynamic update temporarily disabled because the zone is "
|
||||
"frozen. Use 'rndc thaw' to re-enable updates.");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1759,20 +1759,16 @@ send_update_event(ns_client_t *client, dns_zone_t *zone) {
|
|||
*/
|
||||
if (rdata.type == dns_rdatatype_nsec3) {
|
||||
FAILC(DNS_R_REFUSED, "explicit NSEC3 updates are not "
|
||||
"allowed "
|
||||
"in secure zones");
|
||||
"allowed in secure zones");
|
||||
} else if (rdata.type == dns_rdatatype_nsec) {
|
||||
FAILC(DNS_R_REFUSED, "explicit NSEC updates are not "
|
||||
"allowed "
|
||||
"in secure zones");
|
||||
"allowed in secure zones");
|
||||
} else if (rdata.type == dns_rdatatype_rrsig &&
|
||||
!dns_name_equal(name, zonename))
|
||||
{
|
||||
FAILC(DNS_R_REFUSED, "explicit RRSIG updates are "
|
||||
"currently "
|
||||
"not supported in secure zones "
|
||||
"except "
|
||||
"at the apex");
|
||||
FAILC(DNS_R_REFUSED,
|
||||
"explicit RRSIG updates are currently not "
|
||||
"supported in secure zones except at the apex");
|
||||
}
|
||||
|
||||
if (ssutable != NULL) {
|
||||
|
|
@ -1850,16 +1846,16 @@ send_update_event(ns_client_t *client, dns_zone_t *zone) {
|
|||
rdata.type, target, tsigkey,
|
||||
&rules[rule]))
|
||||
{
|
||||
FAILC(DNS_R_REFUSED, "rejected by "
|
||||
"secure update");
|
||||
FAILC(DNS_R_REFUSED,
|
||||
"rejected by secure update");
|
||||
}
|
||||
} else {
|
||||
if (!ssu_checkall(db, ver, name, ssutable,
|
||||
client->signer, &netaddr, env,
|
||||
TCPCLIENT(client), tsigkey))
|
||||
{
|
||||
FAILC(DNS_R_REFUSED, "rejected by "
|
||||
"secure update");
|
||||
FAILC(DNS_R_REFUSED,
|
||||
"rejected by secure update");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1969,15 +1965,15 @@ ns_update_start(ns_client_t *client, isc_nmhandle_t *handle,
|
|||
FAILC(DNS_R_FORMERR, "update zone section contains non-SOA");
|
||||
}
|
||||
if (ISC_LIST_NEXT(zone_rdataset, link) != NULL) {
|
||||
FAILC(DNS_R_FORMERR, "update zone section contains multiple "
|
||||
"RRs");
|
||||
FAILC(DNS_R_FORMERR,
|
||||
"update zone section contains multiple RRs");
|
||||
}
|
||||
|
||||
/* The zone section must have exactly one name. */
|
||||
result = dns_message_nextname(request, DNS_SECTION_ZONE);
|
||||
if (result != ISC_R_NOMORE) {
|
||||
FAILC(DNS_R_FORMERR, "update zone section contains multiple "
|
||||
"RRs");
|
||||
FAILC(DNS_R_FORMERR,
|
||||
"update zone section contains multiple RRs");
|
||||
}
|
||||
|
||||
result = dns_zt_find(client->view->zonetable, zonename, 0, NULL, &zone);
|
||||
|
|
@ -2187,10 +2183,10 @@ check_mx(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
|
|||
}
|
||||
|
||||
if (result == DNS_R_NXRRSET || result == DNS_R_NXDOMAIN) {
|
||||
update_log(client, zone, ISC_LOG_ERROR,
|
||||
"%s/MX '%s' has no address records "
|
||||
"(A or AAAA)",
|
||||
ownerbuf, namebuf);
|
||||
update_log(
|
||||
client, zone, ISC_LOG_ERROR,
|
||||
"%s/MX '%s' has no address records (A or AAAA)",
|
||||
ownerbuf, namebuf);
|
||||
ok = false;
|
||||
} else if (result == DNS_R_CNAME) {
|
||||
update_log(client, zone, ISC_LOG_ERROR,
|
||||
|
|
@ -2945,8 +2941,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
&name, &rdata, &covers, &ttl, &update_class);
|
||||
|
||||
if (ttl != 0) {
|
||||
PREREQFAILC(DNS_R_FORMERR, "prerequisite TTL is not "
|
||||
"zero");
|
||||
PREREQFAILC(DNS_R_FORMERR,
|
||||
"prerequisite TTL is not zero");
|
||||
}
|
||||
|
||||
if (!dns_name_issubdomain(name, zonename)) {
|
||||
|
|
@ -2956,57 +2952,53 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
if (update_class == dns_rdataclass_any) {
|
||||
if (rdata.length != 0) {
|
||||
PREREQFAILC(DNS_R_FORMERR, "class ANY "
|
||||
"prerequisite "
|
||||
"RDATA is not "
|
||||
"empty");
|
||||
PREREQFAILC(DNS_R_FORMERR,
|
||||
"class ANY prerequisite RDATA is "
|
||||
"not empty");
|
||||
}
|
||||
if (rdata.type == dns_rdatatype_any) {
|
||||
CHECK(name_exists(db, ver, name, &flag));
|
||||
if (!flag) {
|
||||
PREREQFAILN(DNS_R_NXDOMAIN, name,
|
||||
"'name in use' "
|
||||
"prerequisite not "
|
||||
"satisfied");
|
||||
PREREQFAILN(
|
||||
DNS_R_NXDOMAIN, name,
|
||||
"'name in use' prerequisite "
|
||||
"not satisfied");
|
||||
}
|
||||
} else {
|
||||
CHECK(rrset_exists(db, ver, name, rdata.type,
|
||||
covers, &flag));
|
||||
if (!flag) {
|
||||
/* RRset does not exist. */
|
||||
PREREQFAILNT(DNS_R_NXRRSET, name,
|
||||
rdata.type,
|
||||
"'rrset exists (value "
|
||||
"independent)' "
|
||||
"prerequisite not "
|
||||
"satisfied");
|
||||
PREREQFAILNT(
|
||||
DNS_R_NXRRSET, name, rdata.type,
|
||||
"'rrset exists (value "
|
||||
"independent)' prerequisite "
|
||||
"not satisfied");
|
||||
}
|
||||
}
|
||||
} else if (update_class == dns_rdataclass_none) {
|
||||
if (rdata.length != 0) {
|
||||
PREREQFAILC(DNS_R_FORMERR, "class NONE "
|
||||
"prerequisite "
|
||||
"RDATA is not "
|
||||
"empty");
|
||||
PREREQFAILC(DNS_R_FORMERR,
|
||||
"class NONE prerequisite RDATA is "
|
||||
"not empty");
|
||||
}
|
||||
if (rdata.type == dns_rdatatype_any) {
|
||||
CHECK(name_exists(db, ver, name, &flag));
|
||||
if (flag) {
|
||||
PREREQFAILN(DNS_R_YXDOMAIN, name,
|
||||
"'name not in use' "
|
||||
"prerequisite not "
|
||||
"satisfied");
|
||||
PREREQFAILN(
|
||||
DNS_R_YXDOMAIN, name,
|
||||
"'name not in use' "
|
||||
"prerequisite not satisfied");
|
||||
}
|
||||
} else {
|
||||
CHECK(rrset_exists(db, ver, name, rdata.type,
|
||||
covers, &flag));
|
||||
if (flag) {
|
||||
/* RRset exists. */
|
||||
PREREQFAILNT(DNS_R_YXRRSET, name,
|
||||
rdata.type,
|
||||
"'rrset does not exist' "
|
||||
"prerequisite not "
|
||||
"satisfied");
|
||||
PREREQFAILNT(
|
||||
DNS_R_YXRRSET, name, rdata.type,
|
||||
"'rrset does not exist' "
|
||||
"prerequisite not satisfied");
|
||||
}
|
||||
}
|
||||
} else if (update_class == zoneclass) {
|
||||
|
|
@ -3047,8 +3039,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
result = temp_check(mctx, &temp, db, ver, tmpname, &type);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
FAILNT(result, tmpname, type,
|
||||
"'RRset exists (value dependent)' "
|
||||
"prerequisite not satisfied");
|
||||
"'RRset exists (value dependent)' prerequisite "
|
||||
"not satisfied");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3110,11 +3102,10 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
CHECK(cname_incompatible_rrset_exists(
|
||||
db, ver, name, &flag));
|
||||
if (flag) {
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"attempt to add CNAME "
|
||||
"alongside non-CNAME "
|
||||
"ignored");
|
||||
update_log(
|
||||
client, zone, LOGLEVEL_PROTOCOL,
|
||||
"attempt to add CNAME "
|
||||
"alongside non-CNAME ignored");
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -3138,8 +3129,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
if (!flag) {
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"attempt to create 2nd "
|
||||
"SOA ignored");
|
||||
"attempt to create 2nd SOA "
|
||||
"ignored");
|
||||
continue;
|
||||
}
|
||||
CHECK(check_soa_increment(db, ver, &rdata,
|
||||
|
|
@ -3148,8 +3139,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"SOA update failed to "
|
||||
"increment serial, "
|
||||
"ignoring it");
|
||||
"increment serial, ignoring "
|
||||
"it");
|
||||
continue;
|
||||
}
|
||||
soa_serial_changed = true;
|
||||
|
|
@ -3163,17 +3154,16 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
dns_rdatatype_format(rdata.type, typebuf,
|
||||
sizeof(typebuf));
|
||||
update_log(client, zone, LOGLEVEL_PROTOCOL,
|
||||
"attempt to add a %s record at "
|
||||
"zone apex ignored",
|
||||
"attempt to add a %s record at zone "
|
||||
"apex ignored",
|
||||
typebuf);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rdata.type == privatetype) {
|
||||
update_log(client, zone, LOGLEVEL_PROTOCOL,
|
||||
"attempt to add a private type "
|
||||
"(%u) record rejected internal "
|
||||
"use only",
|
||||
"attempt to add a private type (%u) "
|
||||
"record rejected internal use only",
|
||||
privatetype);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -3186,11 +3176,10 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
if ((rdata.data[1] & ~DNS_NSEC3FLAG_OPTOUT) !=
|
||||
0)
|
||||
{
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"attempt to add NSEC3PARAM "
|
||||
"record with non OPTOUT "
|
||||
"flag");
|
||||
update_log(
|
||||
client, zone, LOGLEVEL_PROTOCOL,
|
||||
"attempt to add NSEC3PARAM "
|
||||
"record with non OPTOUT flag");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -3201,8 +3190,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
update_log(client, zone, LOGLEVEL_PROTOCOL,
|
||||
"warning: ownername '%s' contains "
|
||||
"a non-terminal wildcard",
|
||||
"warning: ownername '%s' contains a "
|
||||
"non-terminal wildcard",
|
||||
namestr);
|
||||
}
|
||||
|
||||
|
|
@ -3253,10 +3242,10 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
len = (int)isc_buffer_usedlength(&buf);
|
||||
truncated = " [TRUNCATED]";
|
||||
} else if (result != ISC_R_SUCCESS) {
|
||||
snprintf(rdstr, sizeof(rdstr),
|
||||
"[dns_"
|
||||
"rdata_totext failed: %s]",
|
||||
isc_result_totext(result));
|
||||
snprintf(
|
||||
rdstr, sizeof(rdstr),
|
||||
"[dns_rdata_totext failed: %s]",
|
||||
isc_result_totext(result));
|
||||
len = strlen(rdstr);
|
||||
} else {
|
||||
len = (int)isc_buffer_usedlength(&buf);
|
||||
|
|
@ -3344,8 +3333,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
rdata.type == dns_rdatatype_ns))
|
||||
{
|
||||
update_log(client, zone, LOGLEVEL_PROTOCOL,
|
||||
"attempt to delete all SOA "
|
||||
"or NS records ignored");
|
||||
"attempt to delete all SOA or NS "
|
||||
"records ignored");
|
||||
continue;
|
||||
} else {
|
||||
if (isc_log_wouldlog(ns_lctx,
|
||||
|
|
@ -3391,9 +3380,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
if (count == 1) {
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"attempt to "
|
||||
"delete last "
|
||||
"NS ignored");
|
||||
"attempt to delete "
|
||||
"last NS ignored");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -3418,9 +3406,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
sizeof(typebuf));
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"attempt to "
|
||||
"delete in use "
|
||||
"%s ignored",
|
||||
"attempt to delete "
|
||||
"in use %s ignored",
|
||||
typebuf);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -3555,8 +3542,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
|||
result = dns_db_getsize(db, ver, &records, NULL);
|
||||
if (result == ISC_R_SUCCESS && records > maxrecords) {
|
||||
update_log(client, zone, ISC_LOG_ERROR,
|
||||
"records in zone (%" PRIu64 ") "
|
||||
"exceeds max-records (%u)",
|
||||
"records in zone (%" PRIu64
|
||||
") exceeds max-records (%u)",
|
||||
records, maxrecords);
|
||||
result = DNS_R_TOOMANYRECORDS;
|
||||
goto failure;
|
||||
|
|
|
|||
Loading…
Reference in a new issue