From 40af551fe5629b8fbfeb687d6151bef3e595d989 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 30 Aug 2011 16:31:38 -0400 Subject: Have Diag>DNS pull servers from /etc/resolv.conf instead of the config, so it reflects all of the servers in use for the speed report. --- usr/local/www/diag_dns.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local/www') 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"); -- cgit v1.1