diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-07-06 16:34:52 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-07-06 16:35:36 -0500 |
commit | c4045b79ec87ee1ab4305543f1c3af31d0cfb8c9 (patch) | |
tree | 39129e4ac8c45501982c8822bd5c9f834918e554 /src/usr/local/www | |
parent | 83e8a950cae841118459f0edc02f9c2d689ffadd (diff) | |
download | pfsense-c4045b79ec87ee1ab4305543f1c3af31d0cfb8c9.zip pfsense-c4045b79ec87ee1ab4305543f1c3af31d0cfb8c9.tar.gz |
Fix PTR lookups on diag_dns.php. Ticket #6561
Diffstat (limited to 'src/usr/local/www')
-rwxr-xr-x | src/usr/local/www/diag_dns.php | 9 |
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"; |