diff options
author | Warren Baker <warren@decoy.co.za> | 2011-08-14 13:22:23 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2011-08-14 13:22:23 +0200 |
commit | 177779ce6d78f230bd8eb47108d6e833271fb872 (patch) | |
tree | 37418b725f18fff4bc267aba231fccddc8ec7acc /config/unbound/unbound.inc | |
parent | 3bce946ab80e5cb5cbe0c28f86e507364d9e91a7 (diff) | |
download | pfsense-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/unbound.inc')
-rw-r--r-- | config/unbound/unbound.inc | 5 |
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"; |