diff options
-rw-r--r-- | usr/local/www/diag_dns.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php index ec42233..fcb939d 100644 --- a/usr/local/www/diag_dns.php +++ b/usr/local/www/diag_dns.php @@ -102,9 +102,9 @@ if ($_POST) { // Test resolution speed of each DNS server. if ((is_hostname($host) || is_ipaddr($host))) { $dns_speeds = array(); - list($pconfig['dns1'],$pconfig['dns2'],$pconfig['dns3'],$pconfig['dns4']) = $config['system']['dnsserver']; - for ($dnscounter=1; $dnscounter<5; $dnscounter++) { - $dns_server = $pconfig['dns' . $dnscounter]; + $resolvconf_servers = `grep nameserver /etc/resolv.conf | cut -f2 -d' '`; + $dns_servers = explode("\n", $resolvconf_servers); + foreach ($dns_servers as $dns_server) { $query_time = `dig {$host_esc} @{$dns_server} | grep Query | cut -d':' -f2`; if($query_time == "") $query_time = gettext("No response"); |