aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound/unbound.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-09-03 13:21:37 +0200
committerWarren Baker <warren@decoy.co.za>2011-09-03 13:21:37 +0200
commit03de68d1a0ebe8673cd256c06d12f2f2be544bac (patch)
treeb084ae75d22219fd5bd18fa515b90b0ef9846a9a /config/unbound/unbound.inc
parentdd6a79ac75f4062c7cb687364ce58f4f3d08cacf (diff)
downloadpfsense-packages-03de68d1a0ebe8673cd256c06d12f2f2be544bac.tar.gz
pfsense-packages-03de68d1a0ebe8673cd256c06d12f2f2be544bac.tar.bz2
pfsense-packages-03de68d1a0ebe8673cd256c06d12f2f2be544bac.zip
If host in hosts overrides is empty then dont add a '.' pre-pending the domain.
Diffstat (limited to 'config/unbound/unbound.inc')
-rw-r--r--config/unbound/unbound.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index f622bd71..abfd3dd5 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -769,17 +769,19 @@ function unbound_add_host_entries() {
$added_item = array();
foreach ($hosts as $host) {
$current_host = $host['host'];
+ if ($host['host'] != "")
+ $host['ip'] = $host['ip'].".";
if(!$added_item[$current_host]) {
- $host_entries .= "local-data-ptr: \"{$host['ip']} {$host['host']}.{$host['domain']}\"\n";
+ $host_entries .= "local-data-ptr: \"{$host['ip']} {$host['host']}{$host['domain']}\"\n";
if(function_exists("is_ipaddrv6")) {
if (is_ipaddrv6($host['ip']))
- $host_entries .= "local-data: \"{$host['host']}.{$host['domain']} IN AAAA {$host['ip']}\"\n";
+ $host_entries .= "local-data: \"{$host['host']}{$host['domain']} IN AAAA {$host['ip']}\"\n";
else
- $host_entries .= "local-data: \"{$host['host']}.{$host['domain']} IN A {$host['ip']}\"\n";
+ $host_entries .= "local-data: \"{$host['host']}{$host['domain']} IN A {$host['ip']}\"\n";
} else
- $host_entries .= "local-data: \"{$host['host']}.{$host['domain']} IN A {$host['ip']}\"\n";
+ $host_entries .= "local-data: \"{$host['host']}{$host['domain']} IN A {$host['ip']}\"\n";
if (!empty($host['descr']) && $unboundcfg['txtsupport'] == 'on')
- $host_entries .= "local-data: '{$host['host']}.{$host['domain']} TXT \"".addslashes($host['descr'])."\"'\n";
+ $host_entries .= "local-data: '{$host['host']}{$host['domain']} TXT \"".addslashes($host['descr'])."\"'\n";
// Do not add duplicate entries
$added_item[$current_host] = true;