diff options
author | Warren Baker <warren@decoy.co.za> | 2010-11-18 15:16:24 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2010-11-18 15:16:24 +0200 |
commit | fb5105f8852a043a0de890e6660c97fd9fce745b (patch) | |
tree | bcfdbed1a31f17dbc81026246273b2207e893405 | |
parent | f55bcabba944d8a9a86d2f9b206b6e5e557a0161 (diff) | |
download | pfsense-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.
-rw-r--r-- | config/unbound/unbound.inc | 6 |
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; } |