mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-03 22:08:25 -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
4230b2b514
commit
1135bf9284
1 changed files with 77 additions and 90 deletions
167
lib/ns/update.c
167
lib/ns/update.c
|
|
@ -1687,9 +1687,9 @@ send_update(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.");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1768,20 +1768,16 @@ send_update(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) {
|
||||
|
|
@ -1859,16 +1855,16 @@ send_update(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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1973,15 +1969,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_view_findzone(client->view, zonename, DNS_ZTFIND_EXACT,
|
||||
|
|
@ -2185,10 +2181,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,
|
||||
|
|
@ -2803,8 +2799,8 @@ update_action(void *arg) {
|
|||
&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)) {
|
||||
|
|
@ -2814,57 +2810,53 @@ update_action(void *arg) {
|
|||
|
||||
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) {
|
||||
|
|
@ -2905,8 +2897,8 @@ update_action(void *arg) {
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2968,11 +2960,10 @@ update_action(void *arg) {
|
|||
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 {
|
||||
|
|
@ -2996,8 +2987,8 @@ update_action(void *arg) {
|
|||
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,
|
||||
|
|
@ -3006,8 +2997,8 @@ update_action(void *arg) {
|
|||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"SOA update failed to "
|
||||
"increment serial, "
|
||||
"ignoring it");
|
||||
"increment serial, ignoring "
|
||||
"it");
|
||||
continue;
|
||||
}
|
||||
soa_serial_changed = true;
|
||||
|
|
@ -3021,17 +3012,16 @@ update_action(void *arg) {
|
|||
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;
|
||||
}
|
||||
|
|
@ -3044,11 +3034,10 @@ update_action(void *arg) {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -3059,8 +3048,8 @@ update_action(void *arg) {
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
@ -3111,10 +3100,10 @@ update_action(void *arg) {
|
|||
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);
|
||||
|
|
@ -3202,8 +3191,8 @@ update_action(void *arg) {
|
|||
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,
|
||||
|
|
@ -3249,9 +3238,8 @@ update_action(void *arg) {
|
|||
if (count == 1) {
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"attempt to "
|
||||
"delete last "
|
||||
"NS ignored");
|
||||
"attempt to delete "
|
||||
"last NS ignored");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -3276,9 +3264,8 @@ update_action(void *arg) {
|
|||
sizeof(typebuf));
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
"attempt to "
|
||||
"delete in use "
|
||||
"%s ignored",
|
||||
"attempt to delete "
|
||||
"in use %s ignored",
|
||||
typebuf);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -3397,8 +3384,8 @@ update_action(void *arg) {
|
|||
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