Added the allow-recursion statement for when recursion enabled in a view.
Unless specified, this defaults to "localnets, localhost only" yet the intention of specifying a match-clients and recursion is to allow recursive queries from the given address not just localnets. This change adds the specified match-clients under allow-recursion. If match-destination is specified instead, then allow-recusion-on is set for those interfaces.
This commit is contained in:
parent
f5cf852939
commit
658a2cdb9b
@ -15,6 +15,20 @@ view "<%= @name %>" {
|
|||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
recursion <%= @recursion ? 'yes' : 'no' %>;
|
recursion <%= @recursion ? 'yes' : 'no' %>;
|
||||||
|
<%- if @recursion -%>
|
||||||
|
<%- if @match_clients and @match_clients != '' -%>
|
||||||
|
allow-recursion {
|
||||||
|
<%- Array(@match_clients).each do |match_client| -%>
|
||||||
|
<%= match_client %>;
|
||||||
|
<%- end -%>
|
||||||
|
<%- elsif @match_destinations and @match_destinations != '' -%>
|
||||||
|
allow-recursion-on {
|
||||||
|
<%- Array(@match_destinations).each do |match_destination| -%>
|
||||||
|
<%= match_destination %>;
|
||||||
|
<%- end -%>
|
||||||
|
<%- end -%>
|
||||||
|
};
|
||||||
|
<%- end -%>
|
||||||
<%- if scope.lookupvar('osfamily') == 'Debian' -%>
|
<%- if scope.lookupvar('osfamily') == 'Debian' -%>
|
||||||
include "<%= @confdir %>/named.conf.default-zones";
|
include "<%= @confdir %>/named.conf.default-zones";
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user