[bind/named.conf.local] Usage des methodes sur les reverses d'ip du nouveau gen_conf/bind.py

This commit is contained in:
Valentin Samir 2014-02-06 17:49:40 +01:00
parent b9b889e238
commit fa9108784b

View file

@ -6,7 +6,7 @@ info["perms"] = 0644
import config
import config.dns
from gen_confs.bind import netv4_to_arpa, netv6_to_arpa
from gen_confs.bind import ZoneReverse
comment_start = "//"
@ -58,7 +58,8 @@ def forward_zone(zone_name, forwarders):
def reverse_crans():
# On ne génère plus les zone de forward pour les reverse des ips publiques, vu que maintenant, ils marchent
for net in set([ net for net in config.dns.zones_reverse if net not in config.NETs['multicast'] + config.NETs["all"]]):
for zone in netv4_to_arpa(net):
for net in ZoneReverse.network_to_arpanets(net):
zone = ZoneReverse.reverse(net)[0]
forward_zone(zone, [config.dns.master] + config.dns.slaves)
#for net in set(config.dns.zones_reverse_v6):