summaryrefslogtreecommitdiffstats
path: root/etc/inc/system.inc
diff options
context:
space:
mode:
authorRobert Nelson <robertn@the-nelsons.org>2015-03-26 09:19:07 -0700
committerRobert Nelson <robertn@the-nelsons.org>2015-03-26 09:19:07 -0700
commitad20e46dcea5234f19a6d9b8dd93dec00b1160ee (patch)
treedcaa74e0ee21ced741eeafcbccdb220b5e432418 /etc/inc/system.inc
parent52cbfd455ab209a918817501cda618ec3b1886d6 (diff)
parent86feced0f3734e015e70a0e8d85e9b5fed233524 (diff)
downloadpfsense-ad20e46dcea5234f19a6d9b8dd93dec00b1160ee.zip
pfsense-ad20e46dcea5234f19a6d9b8dd93dec00b1160ee.tar.gz
Merge branch 'master' into rfc2136_ignore_ipv4_ipv6
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r--etc/inc/system.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 1cfdfb5..2428631 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -176,15 +176,16 @@ function system_resolvconf_generate($dynupdate = false) {
}
}
} else {
+ $ns = array();
// 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) {
- if ($ns) {
- $resolvconf .= "nameserver $ns\n";
+ foreach ($syscfg['dnsserver'] as $sys_dnsserver) {
+ if ($sys_dnsserver && (!in_array($sys_dnsserver, $ns)) {
+ $resolvconf .= "nameserver $sys_dnsserver\n";
}
}
}
OpenPOWER on IntegriCloud