aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-08-14 13:22:23 +0200
committerWarren Baker <warren@decoy.co.za>2011-08-14 13:22:23 +0200
commit177779ce6d78f230bd8eb47108d6e833271fb872 (patch)
tree37418b725f18fff4bc267aba231fccddc8ec7acc /config/unbound
parent3bce946ab80e5cb5cbe0c28f86e507364d9e91a7 (diff)
downloadpfsense-packages-177779ce6d78f230bd8eb47108d6e833271fb872.tar.gz
pfsense-packages-177779ce6d78f230bd8eb47108d6e833271fb872.tar.bz2
pfsense-packages-177779ce6d78f230bd8eb47108d6e833271fb872.zip
Correctly handle v6 addresses that are configured in host overrides
Diffstat (limited to 'config/unbound')
-rw-r--r--config/unbound/unbound.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index 56e9108a..afc2eddf 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -767,7 +767,10 @@ function unbound_add_host_entries() {
$current_host = $host['host'];
if(!$added_item[$current_host]) {
$host_entries .= "local-data-ptr: \"{$host['ip']} {$host['host']}.{$host['domain']}\"\n";
- $host_entries .= "local-data: \"{$host['host']}.{$host['domain']} IN A {$host['ip']}\"\n";
+ if (is_ipaddrv6($host['ip']))
+ $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";
if (!empty($host['descr']) && $unboundcfg['txtsupport'] == 'on')
$host_entries .= "local-data: '{$host['host']}.{$host['domain']} TXT \"".addslashes($host['descr'])."\"'\n";