diff options
author | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-16 11:39:04 -0700 |
---|---|---|
committer | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-16 11:44:09 -0700 |
commit | 1a1186794d1cdc1e9e9d027b84222e5bc56c9bdd (patch) | |
tree | fdc753ec80e675cb6392eb8c92c64416d8824a66 /config/bind/bind.inc | |
parent | 7789dc6b863df5ed2e93ac5a1786dc84016dc6dc (diff) | |
download | pfsense-packages-1a1186794d1cdc1e9e9d027b84222e5bc56c9bdd.tar.gz pfsense-packages-1a1186794d1cdc1e9e9d027b84222e5bc56c9bdd.tar.bz2 pfsense-packages-1a1186794d1cdc1e9e9d027b84222e5bc56c9bdd.zip |
BIND - refix rate-limit option and add comments to avoid the problem in the future
Put the {} back around the rate-limit values without any whitespace.
{} around PHP variables in <<< text output to named.conf might get confused with {} text in namd.conf.
Added this comment in those areas to help prevent future problems.
// curly braces in the following <<<EOD are PHP {$variable}, not named.conf text { value; }
bump package version
Diffstat (limited to 'config/bind/bind.inc')
-rw-r--r-- | config/bind/bind.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc index c61382cb..58cd1584 100644 --- a/config/bind/bind.inc +++ b/config/bind/bind.inc @@ -162,6 +162,7 @@ function bind_sync() $bind_conf .= "#Do not edit this file!!!\n\n"; $bind_conf .= "$rndc_bindconf\n"; $bind_conf .= "$bind_global_settings\n"; + // curly braces in the following <<<EOD are PHP {$variable}, not named.conf text { value; } $bind_conf .= <<<EOD options { @@ -177,10 +178,11 @@ EOD; if ($bind['rate_enabled'] == "on") { $rate_limit = ($bind['rate_limit'] ? $bind['rate_limit'] : "15"); $log_only = ($bind['log_only'] == "no" ? "no" : "yes"); + // curly braces in the following <<<EOD are PHP {$variable}, not named.conf text { value; } $bind_conf .= <<<EOD rate-limit { - responses-per-second $rate_limit; - log-only $log_only; + responses-per-second {$rate_limit}; + log-only {$log_only}; }; EOD; @@ -249,6 +251,7 @@ EOD; $log_categories = explode(",", $bind['log_options']); $log_severity = ($bind['log_severity'] ? $bind['log_severity'] : 'default'); if (sizeof($log_categories) > 0 && $log_categories[0] != "") { + // curly braces in the following <<<EOD are PHP {$variable}, not named.conf text { value; } $bind_conf .= <<<EOD logging { @@ -854,6 +857,7 @@ function bind_write_rcfile() $rc = array(); $BIND_LOCALBASE = "/usr/local"; $rc['file'] = 'named.sh'; + // curly braces in the following <<<EOD are PHP {$variable}, not named.conf text { value; } $rc['start'] = <<<EOD if [ -z "`ps auxw | grep "[n]amed {$ip_version} -c /etc/namedb/named.conf"|awk '{print $2}'`" ];then {$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/ @@ -863,6 +867,7 @@ EOD; killall -9 named 2>/dev/null sleep 2 EOD; + // curly braces in the following <<<EOD are PHP {$variable}, not named.conf text { value; } $rc['restart'] = <<<EOD if [ -z "`ps auxw | grep "[n]amed {$ip_version} -c /etc/namedb/named.conf"|awk '{print $2}'`" ];then {$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/ |