aboutsummaryrefslogtreecommitdiffstats
path: root/config/bind/bind.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-09 08:10:26 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-09 08:10:26 -0300
commit4f46cf871c6e90430a163daa48a77c22862d08d0 (patch)
tree6e11156c9ebaf66b1af34298a3315b10f455be39 /config/bind/bind.inc
parent31ba635828e90b40bde802f107cfaa25adf4ca76 (diff)
parenta9736ba79d717541744978ee125c11f81c702dc2 (diff)
downloadpfsense-packages-4f46cf871c6e90430a163daa48a77c22862d08d0.tar.gz
pfsense-packages-4f46cf871c6e90430a163daa48a77c22862d08d0.tar.bz2
pfsense-packages-4f46cf871c6e90430a163daa48a77c22862d08d0.zip
Merge pull request #853 from gogglespisano/bind
Diffstat (limited to 'config/bind/bind.inc')
-rw-r--r--config/bind/bind.inc23
1 files changed, 6 insertions, 17 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc
index dc4a9de9..66b16464 100644
--- a/config/bind/bind.inc
+++ b/config/bind/bind.inc
@@ -117,11 +117,14 @@ function bind_sync()
$rndc_confgen = "/usr/local/sbin/rndc-confgen";
if (!file_exists(BIND_LOCALBASE."/etc/rndc-confgen.pfsense") && file_exists($rndc_confgen)) {
exec("$rndc_confgen ", $rndc_conf);
+ $confgen_file = "";
foreach ($rndc_conf as $line) {
$confgen_file .= "$line\n";
}
file_put_contents(BIND_LOCALBASE."/etc/rndc-confgen.pfsense", $confgen_file);
}
+ $rndc_bindconf = "";
+ $rndc_file = "";
if (file_exists(BIND_LOCALBASE."/etc/rndc-confgen.pfsense")) {
$rndc_conf = file(BIND_LOCALBASE."/etc/rndc-confgen.pfsense");
$confgen = "rndc.conf";
@@ -328,6 +331,7 @@ EOD;
// Add Zones in View
$write_config = 0;
+ $custom_root_zone = false;
for ($x = 0; $x < sizeof($bindzone); $x++) {
$zone = $bindzone[$x];
if ($zone['disabled'] == "on") {
@@ -335,7 +339,7 @@ EOD;
}
$zonename = $zone['name'];
if ($zonename == ".") {
- $custom_root_zone[$i] = true;
+ $custom_root_zone = true;
}
$zonetype = $zone['type'];
$zoneview = $zone['view'];
@@ -436,21 +440,6 @@ EOD;
$zonenameserver = $zone['nameserver'];
$zoneipns = $zone['ipns'];
$zonereverso = $zone['reverso'];
- if ($zone['allowupdate'] == '') {
- $zoneallowupdate = "none";
- } else {
- $zoneallowupdate = str_replace(',', '; ', $zone['allowupdate']);
- }
- if ($zone['allowquery'] == '') {
- $zoneallowquery = "none";
- } else {
- $zoneallowquery = str_replace(',', '; ', $zone['allowquery']);
- }
- if ($zone['allowtransfer'] == '') {
- $zoneallowtransfer = "none";
- } else {
- $zoneallowtransfer = str_replace(',', '; ', $zone['allowtransfer']);
- }
$zone_conf = "\$TTL {$zonetll}\n;\n";
if ($zonereverso == "on") {
@@ -639,7 +628,7 @@ EOD;
}
}
}
- if (!$custom_root_zone[$i]) {
+ if (!$custom_root_zone) {
$bind_conf .= "\tzone \".\" {\n";
$bind_conf .= "\t\ttype hint;\n";
$bind_conf .= "\t\tfile \"/etc/namedb/named.root\";\n";