aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2010-11-18 15:16:24 +0200
committerWarren Baker <warren@decoy.co.za>2010-11-18 15:16:24 +0200
commitfb5105f8852a043a0de890e6660c97fd9fce745b (patch)
treebcfdbed1a31f17dbc81026246273b2207e893405 /config/unbound
parentf55bcabba944d8a9a86d2f9b206b6e5e557a0161 (diff)
downloadpfsense-packages-fb5105f8852a043a0de890e6660c97fd9fce745b.tar.gz
pfsense-packages-fb5105f8852a043a0de890e6660c97fd9fce745b.tar.bz2
pfsense-packages-fb5105f8852a043a0de890e6660c97fd9fce745b.zip
Only add TXT records if there is a description for host entries.
Diffstat (limited to 'config/unbound')
-rw-r--r--config/unbound/unbound.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index 2068ae76..40e623b5 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -389,7 +389,8 @@ function unbound_add_host_entries() {
$current_host = $host['host'];
if(!$added_item[$current_host]) {
$host_entries .= "\tlocal-data: '{$host['host']}.{$host['domain']}. IN A {$host['ip']}'\n";
- $host_entries .= "\tlocal-data: '{$host['host']}.{$host['domain']}. TXT \"{$host['descr']}\"'\n";
+ if (!empty($host['descr']))
+ $host_entries .= "\tlocal-data: '{$host['host']}.{$host['domain']}. TXT \"{$host['descr']}\"'\n";
// Do not add duplicate entries
$added_item[$current_host] = true;
}
@@ -412,7 +413,8 @@ function unbound_add_domain_overrides() {
if(!$added_item[$current_domain]) {
$domain_entries .= "local-zone: '{$domain['domain']}.' redirect\n";
$domain_entries .= "\tlocal-data: '{$domain['domain']}. A {$domain['ip']}'\n";
- $domain_entries .= "\tlocal-data: '{$domain['domain']}. TXT \"{$domain['descr']}\"'\n";
+ if (!empty($domain['descr']))
+ $domain_entries .= "\tlocal-data: '{$domain['domain']}. TXT \"{$domain['descr']}\"'\n";
// Do not add duplicate entries
$added_item[$current_domain] = true;
}