summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-29 21:06:51 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-29 21:06:51 +0000
commit2589c9bdde99101f34cba92d511d9fb6a634ff8a (patch)
treed3942e2507d620d2bd8ce585cb5ead798a77d513 /etc/inc
parent5985b8c55090888f7b44254724f5c62e93e5acb1 (diff)
downloadpfsense-2589c9bdde99101f34cba92d511d9fb6a634ff8a.zip
pfsense-2589c9bdde99101f34cba92d511d9fb6a634ff8a.tar.gz
Correctly handle option domain-name-servers
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/services.inc21
1 files changed, 11 insertions, 10 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 67b7ad7..dfbda67 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -153,12 +153,17 @@ EOPP;
$dnscfg .= " option domain-name \"{$dhcpifconf['domain']}\";\n";
}
- if (is_array($dhcpifconf['dnsserver']) && ($dhcpifconf['dnsserver'][0])) {
- $dnscfg .= " option domain-name-servers " . join(",", $dhcpifconf['dnsserver']) . ";";
- } else if (isset($config['dnsmasq']['enable'])) {
- $dnscfg .= " option domain-name-servers " . $ifcfg['ipaddr'] . ";";
- } else if (is_array($syscfg['dnsserver']) && ($syscfg['dnsserver'][0])) {
- $dnscfg .= " option domain-name-servers " . join(",", $syscfg['dnsserver']) . ";";
+ /* is failover dns setup? */
+ if (is_array($dhcpifconf['dnsserver']) && $dhcpifconf['dnsserver'][0] <> "" && $dhcpifconf['dnsserver'][1] <> "") {
+ $dhcpdconf .= " option domain-name-servers " . join(",", $dhcpifconf['dnsserver']) . ";\n";
+ } else {
+ if (is_array($dhcpifconf['dnsserver']) && ($dhcpifconf['dnsserver'][0])) {
+ $dnscfg .= " option domain-name-servers " . join(",", $dhcpifconf['dnsserver']) . ";";
+ } else if (isset($config['dnsmasq']['enable'])) {
+ $dnscfg .= " option domain-name-servers " . $ifcfg['ipaddr'] . ";";
+ } else if (is_array($syscfg['dnsserver']) && ($syscfg['dnsserver'][0])) {
+ $dnscfg .= " option domain-name-servers " . join(",", $syscfg['dnsserver']) . ";";
+ }
}
$dhcpdconf .= "subnet $subnet netmask $subnetmask {\n";
@@ -198,10 +203,6 @@ EOD;
$dhcpdconf .= " option netbios-node-type 8;\n";
}
- if (is_array($dhcpifconf['dnsserver']) && $dhcpifconf['dnsserver'][0] <> "" && $dhcpifconf['dnsserver'][1] <> "") {
- $dhcpdconf .= " option domain-name-servers " . join(",", $dhcpifconf['dnsserver']) . ";\n";
- }
-
if ($dhcpifconf['next-server'])
$dhcpdconf .= " next-server {$dhcpifconf['next-server']};\n";
if ($dhcpifconf['filename'])
OpenPOWER on IntegriCloud