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.
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
|
|
view "<%= @name %>" {
|
|
<%- if @match_clients and @match_clients != '' -%>
|
|
match-clients {
|
|
<%- Array(@match_clients).each do |match_client| -%>
|
|
<%= match_client %>;
|
|
<%- end -%>
|
|
};
|
|
<%- end -%>
|
|
<%- if @match_destinations and @match_destinations != '' -%>
|
|
match-destinations {
|
|
<%- Array(@match_destinations).each do |match_destination| -%>
|
|
<%= match_destination %>;
|
|
<%- end -%>
|
|
};
|
|
<%- end -%>
|
|
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' -%>
|
|
include "<%= @confdir %>/named.conf.default-zones";
|
|
<%- end -%>
|
|
|
|
<%- Array(@zones).each do |zone| -%>
|
|
include "<%= @confdir %>/zones/<%= zone %>.conf";
|
|
<%- end -%>
|
|
};
|