diff options
-rw-r--r-- | config/bind/bind.inc | 18 | ||||
-rw-r--r-- | config/bind/bind_zones.xml | 7 |
2 files changed, 23 insertions, 2 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc index 77f3a770..747fdc27 100644 --- a/config/bind/bind.inc +++ b/config/bind/bind.inc @@ -349,6 +349,7 @@ EOD; $zoneipslave = $zone['slaveip']; $zoneforwarders = $zone['forwarders']; $zonereverso = $zone['reverso']; + $zonereversv6o = $zone['reversv6o']; // Ensure zone view folder exists if (!(is_dir(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview"))) { @@ -374,7 +375,11 @@ EOD; if ($zoneview == $viewname) { // Add zone name if ($zonereverso == "on") { - $bind_conf .= "\tzone \"$zonename.in-addr.arpa\" {\n"; + if ($zonereversv6o == "on") { + $bind_conf .= "\tzone \"$zonename.ip6.arpa\" {\n"; + } else { + $bind_conf .= "\tzone \"$zonename.in-addr.arpa\" {\n"; + } } else { $bind_conf .= "\tzone \"$zonename\" {\n"; } @@ -442,10 +447,15 @@ EOD; $zonenameserver = $zone['nameserver']; $zoneipns = $zone['ipns']; $zonereverso = $zone['reverso']; + $zonereversv6o = $zone['reversv6o']; $zone_conf = "\$TTL {$zonetll}\n;\n"; if ($zonereverso == "on") { - $zone_conf .= "\$ORIGIN {$zonename}.in-addr.arpa.\n\n"; + if ($zonereversv6o == "on") { + $zone_conf .= "\$ORIGIN {$zonename}.ip6.arpa.\n\n"; + } else { + $zone_conf .= "\$ORIGIN {$zonename}.in-addr.arpa.\n\n"; + } } else { $zone_conf .= "\$ORIGIN {$zonename}.\n\n"; } @@ -706,6 +716,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 0; document.iform.nameserver.disabled = 0; document.iform.reverso.disabled = 0; + document.iform.reversv6o.disabled = 0; document.iform.forwarders.disabled = 1; document.iform.dnssec.disabled = 0; document.iform.backupkeys.disabled = 0; @@ -723,6 +734,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 1; document.iform.nameserver.disabled = 1; document.iform.reverso.disabled = 0; + document.iform.reversv6o.disabled = 0; document.iform.forwarders.disabled = 1; document.iform.dnssec.disabled = 0; document.iform.backupkeys.disabled = 0; @@ -740,6 +752,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 1; document.iform.nameserver.disabled = 1; document.iform.reverso.disabled = 1; + document.iform.reversv6o.disabled = 1; document.iform.forwarders.disabled = 0; document.iform.dnssec.disabled = 1; document.iform.backupkeys.disabled = 1; @@ -757,6 +770,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 1; document.iform.nameserver.disabled = 0; document.iform.reverso.disabled = 1; + document.iform.reversv6o.disabled = 1; document.iform.forwarders.disabled = 1; document.iform.dnssec.disabled = 1; document.iform.backupkeys.disabled = 1; diff --git a/config/bind/bind_zones.xml b/config/bind/bind_zones.xml index a62c1aaf..a227aabd 100644 --- a/config/bind/bind_zones.xml +++ b/config/bind/bind_zones.xml @@ -165,6 +165,13 @@ <fieldname>reverso</fieldname> <description>Enable if this is a reverse zone.</description> <type>checkbox</type> + <enablefields>reversv6o</enablefields> + </field> + <field> + <fielddescr>IPv6 Reverse Zone</fielddescr> + <fieldname>reversv6o</fieldname> + <description>Enable if this is a IPv6 reverse zone. Reverse Zone must also be enabled.</description> + <type>checkbox</type> </field> <field> <fielddescr>Custom Option</fielddescr> |