Commit 3cc275c7 authored by Pierre-Elliott Bécue's avatar Pierre-Elliott Bécue

Le reverse ipv6 est géré par un paramètre différent

parent fa0a54b1
......@@ -168,3 +168,4 @@ DNS_CONF = os.path.join(DNS_DIR, 'zones_crans')
DNS_CONF_BCFG2 = "/var/lib/bcfg2/Cfg/etc/bind/generated/zones_crans/zones_crans"
DNS_IPV6 = False
REVERSE_IPV6 = True
......@@ -590,11 +590,11 @@ class ZoneReverse(Zone):
if zone != self.zone_name:
continue
if attr != 'ip6HostNumber' or (machine.get('dnsIpv6', [True])[0] and config.dns.DNS_IPV6):
if attr != 'ip6HostNumber' or (machine.get('dnsIpv6', [True])[0] and config.dns.REVERSE_IPV6):
self.add(PTR(nom, '%s.' % machine['host'][0]))
# Gros kludge pour ajouter le reverse vers le .v6 quand on est sur
# une reverse v6 et que dnsIpv6 est faux.
elif config.dns.DNS_IPV6:
elif config.dns.REVERSE_IPV6:
rev_nom, rev_zone = str(machine['host'][0]).split('.', 1)
self.add(PTR(nom, '%s.v6.%s.' % (rev_nom, rev_zone)))
except AssertionError:
......
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