From 217c0c9b35d3e1449b30ce8aef42bc5a1d70a29f Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 25 May 2016 18:11:46 +0200 Subject: [PATCH] dns: fix AAAA record save PR: https://forum.opnsense.org/index.php?topic=3092.0 --- src/www/services_unbound_host_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/www/services_unbound_host_edit.php b/src/www/services_unbound_host_edit.php index 6174e5c5e..650d55b95 100644 --- a/src/www/services_unbound_host_edit.php +++ b/src/www/services_unbound_host_edit.php @@ -109,8 +109,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $hostent = array(); $hostent['host'] = $pconfig['host']; $hostent['domain'] = $pconfig['domain']; - /* Destinguish between A and AAAA by parsing the passed IP address */ - $hostent['rr'] = $pconfig['rr'] == "A" && is_ipaddrv6($pconfig['ip']) ? "AAA" : $pconfig['rr']; + /* distinguish between A and AAAA by parsing the passed IP address */ + $hostent['rr'] = ($pconfig['rr'] == 'A' && is_ipaddrv6($pconfig['ip'])) ? 'AAAA' : $pconfig['rr']; $hostent['ip'] = $pconfig['ip']; $hostent['mxprio'] = $pconfig['mxprio']; $hostent['mx'] = $pconfig['mx'];