From 177779ce6d78f230bd8eb47108d6e833271fb872 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Sun, 14 Aug 2011 13:22:23 +0200 Subject: Correctly handle v6 addresses that are configured in host overrides --- config/unbound/unbound.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"; -- cgit v1.2.3