Commit 2b699364 authored by Hamza Dely's avatar Hamza Dely

TTL à 86400s pour les champs NS et SOA

parent c36882ac
......@@ -153,7 +153,7 @@ class TLSA(ResourceRecord):
class SOA(ResourceRecord):
"""Ressource pour une entrée DNS SOA"""
def __init__(self, master, email, serial, refresh, retry, expire, ttl):
super(SOA, self).__init__('SOA', '@', '%s. %s. (\n %s ; numero de serie\n %s ; refresh (s)\n %s ; retry (s)\n %s ; expire (s)\n %s ; TTL (s)\n )' % (master, email, serial, refresh, retry, expire, ttl))
super(SOA, self).__init__('SOA', '@', '%s. %s. (\n %s ; numero de serie\n %s ; refresh (s)\n %s ; retry (s)\n %s ; expire (s)\n %s ; TTL (s)\n )' % (master, email, serial, refresh, retry, expire, 86400))
class A(ResourceRecord):
"""Entrée DNS pour une IPv4"""
......@@ -324,7 +324,7 @@ class Zone(ZoneBase):
self.add(soa)
for ns in ns_list:
self.add(NS('@', '%s.' % ns))
self.add(NS('@', '%s.' % ns, ttl=86400))
def name_in_subzone(self, hostname):
"""Teste si le nom qu'on observe est dans une
......@@ -688,7 +688,7 @@ class dns(gen_config):
DS('wifi', '50641 8 2 BF948AF7FD43E05DB4DA1FD9DD7C2B26C36D03BA68D3A48BD41A94294F6A9022'),
DS('tv', '63250 8 2 035D503EF97D4C6774F171DC28284E1BA5AD45B9451131968FC9CCB60900A8C0'),
DS('switches', '57859 8 2 49EC1D08E6C84981F7AF03D57ED30817863E3B876BCC85AFB52CDF087E80A7C1'),
],
],
}
......@@ -759,7 +759,7 @@ class dns(gen_config):
zone = zones[zname].get_name("%s" % subzone)
if zone:
for nameserver in ns_list:
zones[zname].add(NS(zone, '%s.' % nameserver))
zones[zname].add(NS(zone, '%s.' % nameserver, ttl=86400))
if config.dns.REVERSE_IPV6:
with update_dynamic_zone():
......
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