summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-02-06 03:15:57 -0600
committerChris Buechler <cmb@pfsense.org>2016-02-06 03:15:57 -0600
commit5e946f38343f7ed78bbfc7abd616ec84dbfcc742 (patch)
treef9b033fd252ac527ae84e544864af629e0ce79a8 /src
parent2ee6950283462379fe3a69cb997fc461d1430c24 (diff)
downloadpfsense-5e946f38343f7ed78bbfc7abd616ec84dbfcc742.zip
pfsense-5e946f38343f7ed78bbfc7abd616ec84dbfcc742.tar.gz
Use a better check for whether there are DNS servers available with dynamic WAN types. Ticket #4747
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/services_unbound.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php
index 5a35ddb..6e83dd0 100644
--- a/src/usr/local/www/services_unbound.php
+++ b/src/usr/local/www/services_unbound.php
@@ -145,11 +145,10 @@ if ($_POST) {
if (isset($pconfig['forwarding'])) {
$founddns = false;
if (isset($config['system']['dnsallowoverride'])) {
- $a_gateways = return_gateways_array();
- if (is_array($a_gateways)) {
- foreach ($a_gateways as $gateway) {
- if ($gateway['dynamic'] == true) {
- // assume DNS is being obtained dynamically
+ $dns_servers = get_dns_servers();
+ if (is_array($dns_servers)) {
+ foreach ($dns_servers as $dns_server) {
+ if (!ip_in_subnet($dns_server, "127.0.0.0/8")) {
$founddns = true;
}
}
OpenPOWER on IntegriCloud