diff options
author | Robert Nelson <robertn@the-nelsons.org> | 2015-03-26 09:19:07 -0700 |
---|---|---|
committer | Robert Nelson <robertn@the-nelsons.org> | 2015-03-26 09:19:07 -0700 |
commit | ad20e46dcea5234f19a6d9b8dd93dec00b1160ee (patch) | |
tree | dcaa74e0ee21ced741eeafcbccdb220b5e432418 /etc/inc/system.inc | |
parent | 52cbfd455ab209a918817501cda618ec3b1886d6 (diff) | |
parent | 86feced0f3734e015e70a0e8d85e9b5fed233524 (diff) | |
download | pfsense-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.inc | 7 |
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"; } } } |