Skip to content

Commit

Permalink
ensure reverse zone hashes calculated on relevant hosts, and not ALL …
Browse files Browse the repository at this point in the history
…hosts
  • Loading branch information
blofeldthefish committed Jul 2, 2017
1 parent 9ae75aa commit 9e1eebb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/reverse_zone.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% set _ = _zone_data.update({'retry': bind_zone_time_to_retry}) %}
{% set _ = _zone_data.update({'expire': bind_zone_time_to_expire}) %}
{% set _ = _zone_data.update({'minimum': bind_zone_minimum_ttl}) %}
{% set _ = _zone_data.update({'hosts': bind_zone_hosts }) %}
{% set _ = _zone_data.update({'hosts': bind_zone_hosts | selectattr('ip', 'search', '^'+item) | list }) %}
{% set _ = _zone_data.update({'revip': ('.'.join(item.replace(item+'.','').split('.')[::-1])) }) %}
{#
# Compare the zone file hash with the current zone data hash and set serial
Expand Down Expand Up @@ -63,7 +63,7 @@ $ORIGIN {{ ('.'.join(item.replace(item+'.','').split('.')[::-1])) }}.in-addr.arp
IN NS {{ ns }}.
{% endfor %}

{% if _zone_data['hosts']|length > 1 %}
{% if _zone_data['hosts']|length > 0 %}
{% for host in _zone_data['hosts'] %}
{% if host.ip is defined %}
{% if host.ip == item %}
Expand Down

0 comments on commit 9e1eebb

Please sign in to comment.