diff options
author | Renato Botelho <renato@netgate.com> | 2016-04-05 09:38:28 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-04-05 09:38:28 -0300 |
commit | 5ebb5db198982117a173a03fb6261180bcbfd0a9 (patch) | |
tree | 6dba406fe5833e7db2c5d8545ce7218c8f57fb5d | |
parent | 3061702cce23fcc5259f7d6d119a6fe05de84149 (diff) | |
parent | 607b785f637e5b10f51174061242a8a599410796 (diff) | |
download | pfsense-5ebb5db198982117a173a03fb6261180bcbfd0a9.zip pfsense-5ebb5db198982117a173a03fb6261180bcbfd0a9.tar.gz |
Merge pull request #2839 from phil-davis/patch-6
-rwxr-xr-x | src/usr/local/www/diag_dns.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php index 177949e..18cc1bf 100755 --- a/src/usr/local/www/diag_dns.php +++ b/src/usr/local/www/diag_dns.php @@ -97,7 +97,13 @@ if (isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) { $addresses .= " "; } $re = rtrim($re); - $sn = is_ipaddrv6($re) ? '/128' : '/32'; + if (is_ipaddr($re)) { + $sn = is_ipaddrv6($re) ? '/128' : '/32'; + } else { + // The name was a CNAME and resolved to another name, rather than an address. + // In this case the alias entry will have a FQDN, so do not put a CIDR after it. + $sn = ""; + } $addresses .= $re . $sn; $isfirst = false; } |