+4196. [doc] Improve how "enum + other" types are documented.
+ [RT #40608]
+
+4195. [bug] 'max-zone-ttl unlimited;' was broken. [RT #40608]
+
4194. [bug] named-checkconf -p failed to properly print a port
range. [RT #40634]
"with 'masterfile-format map'", zname);
return (ISC_R_FAILURE);
} else if (result == ISC_R_SUCCESS) {
- dns_ttl_t maxttl = cfg_obj_asuint32(obj);
+ dns_ttl_t maxttl = 0; /* unlimited */
+
+ if (cfg_obj_isuint32(obj))
+ maxttl = cfg_obj_asuint32(obj);
dns_zone_setmaxttl(zone, maxttl);
if (raw != NULL)
dns_zone_setmaxttl(raw, maxttl);
except-from { "goodcname.example.net";
"gooddname.example.net"; };
allow-query {!10.53.0.8; any; };
+ max-zone-ttl unlimited;
};
server 10.42.23.3/32 {
<optional> lame-ttl <replaceable>number</replaceable>; </optional>
<optional> max-ncache-ttl <replaceable>number</replaceable>; </optional>
<optional> max-cache-ttl <replaceable>number</replaceable>; </optional>
- <optional> max-zone-ttl <replaceable>number</replaceable> ; </optional>
+ <optional> max-zone-ttl ( <constant>unlimited</constant> | <replaceable>number</replaceable> ; </optional>
<optional> servfail-ttl <replaceable>number</replaceable>; </optional>
<optional> sig-validity-interval <replaceable>number</replaceable> <optional><replaceable>number</replaceable></optional> ; </optional>
<optional> sig-signing-nodes <replaceable>number</replaceable> ; </optional>
load directly into memory, this option cannot be
used with them.)
</para>
+ <para>
+ The default value is <constant>unlimited</constant>.
+ A <option>max-zone-ttl</option> of zero is treated as
+ <constant>unlimited</constant>.
+ </para>
</listitem>
</varlistentry>
clients-per-query <integer>;
cookie-algorithm ( aes | sha1 | sha256 );
cookie-secret <string>;
- coresize <size>;
- datasize <size>;
+ coresize ( unlimited | default | <sizeval> );
+ datasize ( unlimited | default | <sizeval> );
deallocate-on-exit <boolean>; // obsolete
deny-answer-addresses { <address_match_element>; ... } [
except-from { <quoted_string>; ... } ];
deny-answer-aliases { <quoted_string>; ... } [ except-from {
<quoted_string>; ... } ];
- dialup <dialuptype>;
+ dialup ( notify | notify-passive | refresh | passive | <boolean> );
directory <quoted_string>;
disable-algorithms <string> { <string>; ... };
disable-ds-digests <string> { <string>; ... };
fetch-quota-params <integer> <fixedpoint> <fixedpoint> <fixedpoint>;
fetches-per-server <integer> [ ( drop | fail ) ];
fetches-per-zone <integer> [ ( drop | fail ) ];
- files <size>;
+ files ( unlimited | default | <sizeval> );
filter-aaaa { <address_match_element>; ... }; // not configured
- filter-aaaa-on-v4 <filter_aaaa>; // not configured
- filter-aaaa-on-v6 <filter_aaaa>; // not configured
+ filter-aaaa-on-v4 ( break-dnssec | <boolean> ); // not configured
+ filter-aaaa-on-v6 ( break-dnssec | <boolean> ); // not configured
flush-zones-on-shutdown <boolean>;
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address>
hostname ( <quoted_string> | none );
inline-signing <boolean>;
interface-interval <integer>;
- ixfr-from-differences <ixfrdiff>;
+ ixfr-from-differences ( master | slave | <boolean> );
keep-response-order { <address_match_element>; ... };
key-directory <quoted_string>;
lame-ttl <ttlval>;
max-cache-size <size_no_default>;
max-cache-ttl <integer>;
max-clients-per-query <integer>;
- max-ixfr-log-size <size>; // obsolete
+ max-ixfr-log-size ( unlimited | default | <sizeval> ); // obsolete
max-journal-size <size_no_default>;
max-ncache-ttl <integer>;
max-recursion-depth <integer>;
max-transfer-time-in <integer>;
max-transfer-time-out <integer>;
max-udp-size <integer>;
- max-zone-ttl <maxttl_no_default>;
+ max-zone-ttl ( unlimited | <ttlval> );
memstatistics <boolean>;
memstatistics-file <quoted_string>;
min-refresh-time <integer>;
no-case-compress { <address_match_element>; ... };
nocookie-udp-size <integer>;
nosit-udp-size <integer>; // obsolete
- notify <notifytype>;
+ notify ( explicit | master-only | <boolean> );
notify-delay <integer>;
notify-rate <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
sig-validity-interval <integer> [ <integer> ];
sit-secret <string>; // obsolete
sortlist { <address_match_element>; ... };
- stacksize <size>;
+ stacksize ( unlimited | default | <sizeval> );
startup-notify-rate <integer>;
statistics-file <quoted_string>;
statistics-interval <integer>; // not yet implemented
version ( <quoted_string> | none );
zero-no-soa-ttl <boolean>;
zero-no-soa-ttl-cache <boolean>;
- zone-statistics <zonestat>;
+ zone-statistics ( full | terse | none | <boolean> );
};
server <netprefix> {
except-from { <quoted_string>; ... } ];
deny-answer-aliases { <quoted_string>; ... } [ except-from {
<quoted_string>; ... } ];
- dialup <dialuptype>;
+ dialup ( notify | notify-passive | refresh | passive | <boolean> );
disable-algorithms <string> { <string>; ... };
disable-ds-digests <string> { <string>; ... };
disable-empty-zone <string>;
fetches-per-server <integer> [ ( drop | fail ) ];
fetches-per-zone <integer> [ ( drop | fail ) ];
filter-aaaa { <address_match_element>; ... }; // not configured
- filter-aaaa-on-v4 <filter_aaaa>; // not configured
- filter-aaaa-on-v6 <filter_aaaa>; // not configured
+ filter-aaaa-on-v4 ( break-dnssec | <boolean> ); // not configured
+ filter-aaaa-on-v6 ( break-dnssec | <boolean> ); // not configured
forward ( first | only );
forwarders [ port <integer> ] [ dscp <integer> ] { ( <ipv4_address>
| <ipv6_address> ) [ port <integer> ] [ dscp <integer> ]; ... };
inline-signing <boolean>;
- ixfr-from-differences <ixfrdiff>;
+ ixfr-from-differences ( master | slave | <boolean> );
key <string> {
algorithm <string>;
secret <string>;
max-cache-size <size_no_default>;
max-cache-ttl <integer>;
max-clients-per-query <integer>;
- max-ixfr-log-size <size>; // obsolete
+ max-ixfr-log-size ( unlimited | default | <sizeval> ); // obsolete
max-journal-size <size_no_default>;
max-ncache-ttl <integer>;
max-recursion-depth <integer>;
max-transfer-time-in <integer>;
max-transfer-time-out <integer>;
max-udp-size <integer>;
- max-zone-ttl <maxttl_no_default>;
+ max-zone-ttl ( unlimited | <ttlval> );
min-refresh-time <integer>;
min-retry-time <integer>;
min-roots <integer>; // not implemented
no-case-compress { <address_match_element>; ... };
nocookie-udp-size <integer>;
nosit-udp-size <integer>; // obsolete
- notify <notifytype>;
+ notify ( explicit | master-only | <boolean> );
notify-delay <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
dscp <integer> ];
check-wildcard <boolean>;
database <string>;
delegation-only <boolean>;
- dialup <dialuptype>;
+ dialup ( notify | notify-passive | refresh | passive |
+ <boolean> );
dlz <string>;
dnssec-dnskey-kskonly <boolean>;
dnssec-loadkeys-interval <integer>;
masters [ port <integer> ] [ dscp <integer> ] { ( <masters>
| <ipv4_address> [ port <integer> ] | <ipv6_address> [
port <integer> ] ) [ key <string> ]; ... };
- max-ixfr-log-size <size>; // obsolete
+ max-ixfr-log-size ( unlimited | default |
+ <sizeval> ); // obsolete
max-journal-size <size_no_default>;
max-refresh-time <integer>;
max-retry-time <integer>;
max-transfer-idle-out <integer>;
max-transfer-time-in <integer>;
max-transfer-time-out <integer>;
- max-zone-ttl <maxttl_no_default>;
+ max-zone-ttl ( unlimited | <ttlval> );
min-refresh-time <integer>;
min-retry-time <integer>;
multi-master <boolean>;
- notify <notifytype>;
+ notify ( explicit | master-only | <boolean> );
notify-delay <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | *
) ] [ dscp <integer> ];
] <rrtypelist>; ... };
use-alt-transfer-source <boolean>;
zero-no-soa-ttl <boolean>;
- zone-statistics <zonestat>;
+ zone-statistics ( full | terse | none | <boolean> );
};
- zone-statistics <zonestat>;
+ zone-statistics ( full | terse | none | <boolean> );
};
zone <string> <optional_class> {
check-wildcard <boolean>;
database <string>;
delegation-only <boolean>;
- dialup <dialuptype>;
+ dialup ( notify | notify-passive | refresh | passive | <boolean> );
dlz <string>;
dnssec-dnskey-kskonly <boolean>;
dnssec-loadkeys-interval <integer>;
masters [ port <integer> ] [ dscp <integer> ] { ( <masters> |
<ipv4_address> [ port <integer> ] | <ipv6_address> [ port
<integer> ] ) [ key <string> ]; ... };
- max-ixfr-log-size <size>; // obsolete
+ max-ixfr-log-size ( unlimited | default | <sizeval> ); // obsolete
max-journal-size <size_no_default>;
max-refresh-time <integer>;
max-retry-time <integer>;
max-transfer-idle-out <integer>;
max-transfer-time-in <integer>;
max-transfer-time-out <integer>;
- max-zone-ttl <maxttl_no_default>;
+ max-zone-ttl ( unlimited | <ttlval> );
min-refresh-time <integer>;
min-retry-time <integer>;
multi-master <boolean>;
- notify <notifytype>;
+ notify ( explicit | master-only | <boolean> );
notify-delay <integer>;
notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
dscp <integer> ];
| zonesub | external ) [ <string> ] <rrtypelist>; ... };
use-alt-transfer-source <boolean>;
zero-no-soa-ttl <boolean>;
- zone-statistics <zonestat>;
+ zone-statistics ( full | terse | none | <boolean> );
};
const cfg_type_t *othertype, cfg_obj_t **ret);
static void
-doc_enum_or_other(cfg_printer_t *pctx, const cfg_type_t *type);
+doc_enum_or_other(cfg_printer_t *pctx, const cfg_type_t *enumtype,
+ const cfg_type_t *othertype);
static isc_result_t
parse_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
parse_zonestat(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
+static void
+doc_zonestat(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_boolean);
+}
static cfg_type_t cfg_type_zonestat = {
- "zonestat", parse_zonestat, cfg_print_ustring, doc_enum_or_other,
+ "zonestat", parse_zonestat, cfg_print_ustring, doc_zonestat,
&cfg_rep_string, zonestat_enums
};
static void
doc_optional_response(cfg_printer_t *pctx, const cfg_type_t *type) {
- UNUSED(type);
- cfg_print_cstr(pctx, "[ ( drop | fail ) ]");
+ doc_enum_or_other(pctx, type, &cfg_type_void);
}
static cfg_type_t cfg_type_responsetype = {
return (parse_enum_or_other(pctx, type, &cfg_type_sizeval, ret));
}
+static void
+doc_size(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_sizeval);
+}
+
static const char *size_enums[] = { "unlimited", "default", NULL };
static cfg_type_t cfg_type_size = {
- "size", parse_size, cfg_print_ustring, cfg_doc_terminal,
+ "size", parse_size, cfg_print_ustring, doc_size,
&cfg_rep_string, size_enums
};
}
static void
-doc_enum_or_other(cfg_printer_t *pctx, const cfg_type_t *type) {
- cfg_doc_terminal(pctx, type);
-#if 0 /* XXX */
- cfg_print_chars(pctx, "( ", 2);...
-#endif
+doc_enum_or_other(cfg_printer_t *pctx, const cfg_type_t *enumtype,
+ const cfg_type_t *othertype)
+{
+ const char * const *p;
+ isc_boolean_t first = ISC_TRUE;
+ /*
+ * If othertype is cfg_type_void, it means that enumtype is
+ * optional.
+ */
+
+ if (othertype == &cfg_type_void)
+ cfg_print_cstr(pctx, "[ ");
+ cfg_print_cstr(pctx, "( ");
+ for (p = enumtype->of; *p != NULL; p++) {
+ if (!first)
+ cfg_print_cstr(pctx, " | ");
+ first = ISC_FALSE;
+ cfg_print_cstr(pctx, *p);
+ }
+ if (othertype != &cfg_type_void) {
+ if (!first)
+ cfg_print_cstr(pctx, " | ");
+ cfg_doc_terminal(pctx, othertype);
+ }
+ cfg_print_cstr(pctx, " )");
+ if (othertype == &cfg_type_void)
+ cfg_print_cstr(pctx, " ]");
}
static isc_result_t
parse_dialup_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
+static void
+doc_dialup_type(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_boolean);
+}
static cfg_type_t cfg_type_dialuptype = {
- "dialuptype", parse_dialup_type, cfg_print_ustring, doc_enum_or_other,
+ "dialuptype", parse_dialup_type, cfg_print_ustring, doc_dialup_type,
&cfg_rep_string, dialup_enums
};
parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
+static void
+doc_notify_type(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_boolean);
+}
static cfg_type_t cfg_type_notifytype = {
- "notifytype", parse_notify_type, cfg_print_ustring, doc_enum_or_other,
+ "notifytype", parse_notify_type, cfg_print_ustring, doc_notify_type,
&cfg_rep_string, notify_enums,
};
static const char *ixfrdiff_enums[] = { "master", "slave", NULL };
static isc_result_t
-parse_ixfrdiff_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
+parse_ixfrdiff_type(cfg_parser_t *pctx, const cfg_type_t *type,
+ cfg_obj_t **ret)
+{
return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
+static void
+doc_ixfrdiff_type(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_boolean);
+}
static cfg_type_t cfg_type_ixfrdifftype = {
- "ixfrdiff", parse_ixfrdiff_type, cfg_print_ustring, doc_enum_or_other,
+ "ixfrdiff", parse_ixfrdiff_type, cfg_print_ustring, doc_ixfrdiff_type,
&cfg_rep_string, ixfrdiff_enums,
};
cfg_obj_t **ret) {
return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
+static void
+doc_filter_aaaa(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_boolean);
+}
static cfg_type_t cfg_type_filter_aaaa = {
"filter_aaaa", parse_filter_aaaa, cfg_print_ustring,
- doc_enum_or_other, &cfg_rep_string, filter_aaaa_enums,
+ doc_filter_aaaa, &cfg_rep_string, filter_aaaa_enums,
};
static keyword_type_t key_kw = { "key", &cfg_type_astring };
return (parse_enum_or_other(pctx, type, &cfg_type_uint32, ret));
}
+static void
+doc_logversions(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_uint32);
+}
+
static cfg_type_t cfg_type_logversions = {
- "logversions", parse_logversions, cfg_print_ustring, cfg_doc_terminal,
+ "logversions", parse_logversions, cfg_print_ustring, doc_logversions,
&cfg_rep_string, logversions_enums
};
return (parse_enum_or_other(pctx, type, &cfg_type_ttlval, ret));
}
+static void
+doc_maxttl(cfg_printer_t *pctx, const cfg_type_t *type) {
+ doc_enum_or_other(pctx, type, &cfg_type_ttlval);
+}
+
/*%
* A size or "unlimited", but not "default".
*/
static const char *maxttl_enums[] = { "unlimited", NULL };
static cfg_type_t cfg_type_maxttl = {
- "maxttl_no_default", parse_maxttl, cfg_print_ustring, cfg_doc_terminal,
+ "maxttl_no_default", parse_maxttl, cfg_print_ustring, doc_maxttl,
&cfg_rep_string, maxttl_enums
};