diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-02-06 03:15:57 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-02-06 03:15:57 -0600 |
commit | 5e946f38343f7ed78bbfc7abd616ec84dbfcc742 (patch) | |
tree | f9b033fd252ac527ae84e544864af629e0ce79a8 /src/usr/local | |
parent | 2ee6950283462379fe3a69cb997fc461d1430c24 (diff) | |
download | pfsense-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/usr/local')
-rw-r--r-- | src/usr/local/www/services_unbound.php | 9 |
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; } } |