+3743. [bug] delegation-only flag wasn't working in forward zone
+ declarations despite being documented. This is
+ needed to support turning off forwarding and turning
+ on delegation only at the same name. [RT #35392]
+
3742. [port] linux: libcap support: declare curval at start of
block. [RT #35387]
(void)cfg_map_get(zoptions, "forward", &forwardtype);
(void)cfg_map_get(zoptions, "forwarders", &forwarders);
- result = configure_forward(config, view, origin, forwarders,
- forwardtype);
+ CHECK(configure_forward(config, view, origin, forwarders,
+ forwardtype));
+
+ /*
+ * Forward zones may also set delegation only.
+ */
+ only = NULL;
+ tresult = cfg_map_get(zoptions, "delegation-only", &only);
+ if (tresult == ISC_R_SUCCESS && cfg_obj_asboolean(only))
+ CHECK(dns_view_adddelegationonly(view, origin));
goto cleanup;
}
Delegation only. Logs queries that have been
forced to NXDOMAIN as the result of a
delegation-only zone or a
- <command>delegation-only</command> in a hint
- or stub zone declaration.
+ <command>delegation-only</command> in a
+ forward, hint or stub zone declaration.
</para>
</entry>
</row>
type forward;
<optional> forward (<constant>only</constant>|<constant>first</constant>) ; </optional>
<optional> forwarders { <optional> <replaceable>ip_addr</replaceable> <optional>port <replaceable>ip_port</replaceable></optional> <optional>dscp <replaceable>ip_dscp</replaceable></optional> ; ... </optional> }; </optional>
+ <optional> delegation-only <replaceable>yes_or_no</replaceable> ; </optional>
};
zone <replaceable>"."</replaceable> <optional><replaceable>class</replaceable></optional> {
<term><command>delegation-only</command></term>
<listitem>
<para>
- The flag only applies to hint and stub zones. If set
- to <userinput>yes</userinput>, then the zone will also be
- treated as if it is also a delegation-only type zone.
+ The flag only applies to forward, hint and stub
+ zones. If set to <userinput>yes</userinput>,
+ then the zone will also be treated as if it is
+ also a delegation-only type zone.
</para>
<para>
See caveats in <xref linkend="root_delegation_only"/>.
{ "notify", MASTERZONE | SLAVEZONE },
{ "also-notify", MASTERZONE | SLAVEZONE },
{ "dialup", MASTERZONE | SLAVEZONE | STUBZONE | STREDIRECTZONE },
- { "delegation-only", HINTZONE | STUBZONE | DELEGATIONZONE },
+ { "delegation-only", HINTZONE | STUBZONE | FORWARDZONE |
+ DELEGATIONZONE },
{ "forward", MASTERZONE | SLAVEZONE | STUBZONE |
STATICSTUBZONE | FORWARDZONE },
{ "forwarders", MASTERZONE | SLAVEZONE | STUBZONE |