summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-10-25 22:09:37 -0500
committerChris Buechler <cmb@pfsense.org>2014-10-25 22:11:45 -0500
commite8b5f72496f64b25a47e20bd48ed9d98d9bd1626 (patch)
tree11fca10fa22717ff3b4ee5ebb0787986ad171eff /etc/inc
parent23ed5b787148483d1a93261285e7cf1c173872c7 (diff)
downloadpfsense-e8b5f72496f64b25a47e20bd48ed9d98d9bd1626.zip
pfsense-e8b5f72496f64b25a47e20bd48ed9d98d9bd1626.tar.gz
domain and search should not both be defined in resolv.conf per FreeBSD man page and handbook (only the latter is actually used). Change this to just not use domain, and set the search to the system's domain where not using the function that generates the search list for dynamic WANs.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/system.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index e903cdb..02f824b 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -109,10 +109,6 @@ function system_resolvconf_generate($dynupdate = false) {
$syscfg = $config['system'];
- // Do not create blank domain lines, it breaks tools like dig.
- if($syscfg['domain'])
- $resolvconf = "domain {$syscfg['domain']}\n";
-
if (((isset($config['dnsmasq']['enable']) && (empty($config['dnsmasq']['interface']) || in_array("lo0", explode(",", $config['dnsmasq']['interface']))))
|| (isset($config['unbound']['enable'])) && (empty($config['unbound']['active_interface']) || in_array("lo0", explode(",", $config['unbound']['active_interface']))))
&& !isset($config['system']['dnslocalhost']))
@@ -130,6 +126,10 @@ function system_resolvconf_generate($dynupdate = false) {
if($nameserver)
$resolvconf .= "nameserver $nameserver\n";
}
+ } else {
+ // Do not create blank search/domain lines, it can break tools like dig.
+ if($syscfg['domain'])
+ $resolvconf = "search {$syscfg['domain']}\n";
}
if (is_array($syscfg['dnsserver'])) {
foreach ($syscfg['dnsserver'] as $ns) {
OpenPOWER on IntegriCloud