Commit 40a250fd authored by Hamza Dely's avatar Hamza Dely

Correction de gen_zones_reverse_delegation_v6

parent 844bcd9c
......@@ -747,13 +747,18 @@ class dns(gen_config):
zones[str(net)] = ZoneReverse(str(net), ttl, self.gen_soa(ns_list, serial, ttl), ns_list)
return zones
def gen_zones_reverse_delegation_v6(self, ttl, ns_list, serial, zones, populate=True):
def gen_zones_reverse_delegation_v6(self, ttl, ns_list, serial, zones={}, populate=True):
"""Génération de la délégation des reverses pour les différents /64 du Crans"""
for net in ZoneReverse.network_to_arpanets(config.prefix['subnet']):
zname = str(net)
zones[zname] = ZoneReverse(zname, ttl, self.gen_soa(ns_list, serial, ttl), ns_list)
if populate:
zones[zname].extend(self.MXs)
for rr_type in [self.DSs, self.EXTRAS, self.SPFs, self.NON_CLONABLE_SPFs, self.DKIM]:
if zones[zname].zone_name in rr_type.keys():
zones[zname].extend(rr_type[zones[zname].zone_name])
for subnet in ZoneReverse.network_to_arpanets(config.dns.zones_reverse_v6):
subzone, length = ZoneReverse.reverse(subnet)
zone = zones[zname].get_name("%s" % subzone)
......@@ -761,9 +766,6 @@ class dns(gen_config):
for nameserver in ns_list:
zones[zname].add(NS(zone, '%s.' % nameserver, ttl=86400))
if config.dns.REVERSE_IPV6:
with update_dynamic_zone():
zones[zname].write(os.path.join(self.DNS_DIR, 'db.%s' % (zones[zname].zone_name,)))
return zones
def gen_zones_clone(self, ttl, ns_list, serial, zones={}):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment