summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-07-06 16:34:52 -0500
committerChris Buechler <cmb@pfsense.org>2016-07-06 16:35:36 -0500
commitc4045b79ec87ee1ab4305543f1c3af31d0cfb8c9 (patch)
tree39129e4ac8c45501982c8822bd5c9f834918e554 /src
parent83e8a950cae841118459f0edc02f9c2d689ffadd (diff)
downloadpfsense-c4045b79ec87ee1ab4305543f1c3af31d0cfb8c9.zip
pfsense-c4045b79ec87ee1ab4305543f1c3af31d0cfb8c9.tar.gz
Fix PTR lookups on diag_dns.php. Ticket #6561
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/local/www/diag_dns.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php
index dfbbd53..4284993 100755
--- a/src/usr/local/www/diag_dns.php
+++ b/src/usr/local/www/diag_dns.php
@@ -192,10 +192,13 @@ if ($_POST) {
if (!$input_errors) {
if (is_ipaddr($host)) {
$type = "ip";
- $resolved = gethostbyaddr($host);
+ $resolvedptr = gethostbyaddr($host);
$ipaddr = $host;
- if ($host != $resolved) {
- $hostname = $resolved;
+ if ($host != $resolvedptr) {
+ $tmpresolved = array();
+ $tmpresolved['type'] = "PTR";
+ $tmpresolved['data'] = $resolvedptr;
+ $resolved[] = $tmpresolved;
}
} elseif (is_hostname($host)) {
$type = "hostname";
OpenPOWER on IntegriCloud