Extend ttlval to accept ISO 8601 durations
The ttlval configuration types are replaced by duration configuration types. The duration is an ISO 8601 duration that is going to be used for DNSSEC key timings such as key lifetimes, signature resign intervals and refresh periods, etc. But it is also still allowed to use the BIND ttlval ways of configuring intervals (number plus optional unit). A duration is stored as an array of 7 different time parts. A duration can either be expressed in weeks, or in a combination of the other datetime indicators. Add several unit tests to ensure the correct value is parsed given different string values.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<command>max-records</command> <replaceable>integer</replaceable>;
|
||||
<command>max-transfer-idle-out</command> <replaceable>integer</replaceable>;
|
||||
<command>max-transfer-time-out</command> <replaceable>integer</replaceable>;
|
||||
<command>max-zone-ttl</command> ( unlimited | <replaceable>ttlval</replaceable> );
|
||||
<command>max-zone-ttl</command> ( unlimited | <replaceable>duration</replaceable> );
|
||||
<command>notify</command> ( explicit | master-only | <replaceable>boolean</replaceable> );
|
||||
<command>notify-delay</command> <replaceable>integer</replaceable>;
|
||||
<command>notify-source</command> ( <replaceable>ipv4_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * ) ] [ dscp <replaceable>integer</replaceable> ];
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
[ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port
|
||||
<replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
|
||||
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [
|
||||
<command>in-memory</command> <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ]; ... };
|
||||
<command>in-memory</command> <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>duration</replaceable> ]; ... };
|
||||
<command>check-dup-records</command> ( fail | warn | ignore );
|
||||
<command>check-integrity</command> <replaceable>boolean</replaceable>;
|
||||
<command>check-mx</command> ( fail | warn | ignore );
|
||||
@@ -127,18 +127,18 @@
|
||||
<command>fstrm-set-output-notify-threshold</command> <replaceable>integer</replaceable>;
|
||||
<command>fstrm-set-output-queue-model</command> ( mpsc | spsc );
|
||||
<command>fstrm-set-output-queue-size</command> <replaceable>integer</replaceable>;
|
||||
<command>fstrm-set-reopen-interval</command> <replaceable>ttlval</replaceable>;
|
||||
<command>fstrm-set-reopen-interval</command> <replaceable>duration</replaceable>;
|
||||
<command>geoip-directory</command> ( <replaceable>quoted_string</replaceable> | none );
|
||||
<command>glue-cache</command> <replaceable>boolean</replaceable>;
|
||||
<command>heartbeat-interval</command> <replaceable>integer</replaceable>;
|
||||
<command>hostname</command> ( <replaceable>quoted_string</replaceable> | none );
|
||||
<command>inline-signing</command> <replaceable>boolean</replaceable>;
|
||||
<command>interface-interval</command> <replaceable>ttlval</replaceable>;
|
||||
<command>interface-interval</command> <replaceable>duration</replaceable>;
|
||||
<command>ixfr-from-differences</command> ( primary | master | secondary | slave |
|
||||
<replaceable>boolean</replaceable> );
|
||||
<command>keep-response-order</command> { <replaceable>address_match_element</replaceable>; ... };
|
||||
<command>key-directory</command> <replaceable>quoted_string</replaceable>;
|
||||
<command>lame-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>lame-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>listen-on</command> [ port <replaceable>integer</replaceable> ] [ dscp
|
||||
<replaceable>integer</replaceable> ] {
|
||||
<replaceable>address_match_element</replaceable>; ... };
|
||||
@@ -152,28 +152,28 @@
|
||||
<command>masterfile-style</command> ( full | relative );
|
||||
<command>match-mapped-addresses</command> <replaceable>boolean</replaceable>;
|
||||
<command>max-cache-size</command> ( default | unlimited | <replaceable>sizeval</replaceable> | <replaceable>percentage</replaceable> );
|
||||
<command>max-cache-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>max-cache-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>max-clients-per-query</command> <replaceable>integer</replaceable>;
|
||||
<command>max-journal-size</command> ( default | unlimited | <replaceable>sizeval</replaceable> );
|
||||
<command>max-ncache-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>max-ncache-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>max-records</command> <replaceable>integer</replaceable>;
|
||||
<command>max-recursion-depth</command> <replaceable>integer</replaceable>;
|
||||
<command>max-recursion-queries</command> <replaceable>integer</replaceable>;
|
||||
<command>max-refresh-time</command> <replaceable>integer</replaceable>;
|
||||
<command>max-retry-time</command> <replaceable>integer</replaceable>;
|
||||
<command>max-rsa-exponent-size</command> <replaceable>integer</replaceable>;
|
||||
<command>max-stale-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>max-stale-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>max-transfer-idle-in</command> <replaceable>integer</replaceable>;
|
||||
<command>max-transfer-idle-out</command> <replaceable>integer</replaceable>;
|
||||
<command>max-transfer-time-in</command> <replaceable>integer</replaceable>;
|
||||
<command>max-transfer-time-out</command> <replaceable>integer</replaceable>;
|
||||
<command>max-udp-size</command> <replaceable>integer</replaceable>;
|
||||
<command>max-zone-ttl</command> ( unlimited | <replaceable>ttlval</replaceable> );
|
||||
<command>max-zone-ttl</command> ( unlimited | <replaceable>duration</replaceable> );
|
||||
<command>memstatistics</command> <replaceable>boolean</replaceable>;
|
||||
<command>memstatistics-file</command> <replaceable>quoted_string</replaceable>;
|
||||
<command>message-compression</command> <replaceable>boolean</replaceable>;
|
||||
<command>min-cache-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>min-ncache-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>min-cache-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>min-ncache-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>min-refresh-time</command> <replaceable>integer</replaceable>;
|
||||
<command>min-retry-time</command> <replaceable>integer</replaceable>;
|
||||
<command>minimal-any</command> <replaceable>boolean</replaceable>;
|
||||
@@ -190,8 +190,8 @@
|
||||
<command>notify-source-v6</command> ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * ) ]
|
||||
[ dscp <replaceable>integer</replaceable> ];
|
||||
<command>notify-to-soa</command> <replaceable>boolean</replaceable>;
|
||||
<command>nta-lifetime</command> <replaceable>ttlval</replaceable>;
|
||||
<command>nta-recheck</command> <replaceable>ttlval</replaceable>;
|
||||
<command>nta-lifetime</command> <replaceable>duration</replaceable>;
|
||||
<command>nta-recheck</command> <replaceable>duration</replaceable>;
|
||||
<command>nxdomain-redirect</command> <replaceable>string</replaceable>;
|
||||
<command>pid-file</command> ( <replaceable>quoted_string</replaceable> | none );
|
||||
<command>port</command> <replaceable>integer</replaceable>;
|
||||
@@ -238,13 +238,13 @@
|
||||
<command>response-padding</command> { <replaceable>address_match_element</replaceable>; ... } block-size
|
||||
<replaceable>integer</replaceable>;
|
||||
<command>response-policy</command> { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
|
||||
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
|
||||
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
|
||||
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>duration</replaceable> ] [ min-update-interval
|
||||
<replaceable>duration</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
|
||||
<command>nodata</command> | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
|
||||
<command>recursive-only</command> <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
|
||||
<command>nsdname-enable</command> <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
|
||||
<command>break-dnssec</command> <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
|
||||
<command>min-update-interval</command> <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
|
||||
<command>break-dnssec</command> <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>duration</replaceable> ] [
|
||||
<command>min-update-interval</command> <replaceable>duration</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
|
||||
<command>nsip-wait-recurse</command> <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
|
||||
[ recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
|
||||
<command>nsdname-enable</command> <replaceable>boolean</replaceable> ] [ dnsrps-enable <replaceable>boolean</replaceable> ] [
|
||||
@@ -258,7 +258,7 @@
|
||||
<command>serial-query-rate</command> <replaceable>integer</replaceable>;
|
||||
<command>serial-update-method</command> ( date | increment | unixtime );
|
||||
<command>server-id</command> ( <replaceable>quoted_string</replaceable> | none | hostname );
|
||||
<command>servfail-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>servfail-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>session-keyalg</command> <replaceable>string</replaceable>;
|
||||
<command>session-keyfile</command> ( <replaceable>quoted_string</replaceable> | none );
|
||||
<command>session-keyname</command> <replaceable>string</replaceable>;
|
||||
@@ -269,7 +269,7 @@
|
||||
<command>sortlist</command> { <replaceable>address_match_element</replaceable>; ... };
|
||||
<command>stacksize</command> ( default | unlimited | <replaceable>sizeval</replaceable> );
|
||||
<command>stale-answer-enable</command> <replaceable>boolean</replaceable>;
|
||||
<command>stale-answer-ttl</command> <replaceable>ttlval</replaceable>;
|
||||
<command>stale-answer-ttl</command> <replaceable>duration</replaceable>;
|
||||
<command>startup-notify-rate</command> <replaceable>integer</replaceable>;
|
||||
<command>statistics-file</command> <replaceable>quoted_string</replaceable>;
|
||||
<command>synth-from-dnssec</command> <replaceable>boolean</replaceable>;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<command>masterfile-style</command> ( full | relative );
|
||||
<command>masters</command> [ port <replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key <replaceable>string</replaceable> ]; ... };
|
||||
<command>max-records</command> <replaceable>integer</replaceable>;
|
||||
<command>max-zone-ttl</command> ( unlimited | <replaceable>ttlval</replaceable> );
|
||||
<command>max-zone-ttl</command> ( unlimited | <replaceable>duration</replaceable> );
|
||||
<command>zone-statistics</command> ( full | terse | none | <replaceable>boolean</replaceable> );
|
||||
};
|
||||
</programlisting>
|
||||
|
||||
Reference in New Issue
Block a user