diff options
author | jim-p <jimp@netgate.com> | 2018-10-22 15:31:52 -0400 |
---|---|---|
committer | jim-p <jimp@netgate.com> | 2018-10-22 15:32:51 -0400 |
commit | 7a16a38c11b6751848862726f0ab8ed4d257b7d6 (patch) | |
tree | a844f55550dd252b3b7560702def317c5f95b650 /src/etc | |
parent | aa73335131ff6ccc95d624c04b2a9f6a8065ef2f (diff) | |
download | pfsense-7a16a38c11b6751848862726f0ab8ed4d257b7d6.zip pfsense-7a16a38c11b6751848862726f0ab8ed4d257b7d6.tar.gz |
Use the fw domain for DNS search when no other choices exist. Fixes #9056
(cherry picked from commit 74a8a219d33c9b87ab4b6b4026d247f0f6bdcaa6)
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/system.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 882a2da..4a40a18 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -126,6 +126,7 @@ function system_resolvconf_generate($dynupdate = false) { $resolvconf .= "nameserver $dns_ns\n"; } + $ns = array(); if (isset($syscfg['dnsallowoverride'])) { /* get dynamically assigned DNS servers (if any) */ $ns = array_unique(get_searchdomains()); @@ -134,8 +135,8 @@ function system_resolvconf_generate($dynupdate = false) { $resolvconf .= "search {$searchserver}\n"; } } - } else { - $ns = array(); + } + if (empty($ns)) { // Do not create blank search/domain lines, it can break tools like dig. if ($syscfg['domain']) { $resolvconf .= "search {$syscfg['domain']}\n"; |