summaryrefslogtreecommitdiffstats
path: root/etc/inc/services.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-06-18 15:54:20 -0400
committerjim-p <jimp@pfsense.org>2013-06-18 15:54:20 -0400
commit4f0710f32fc5be8e58b5608446933a0bd5ef7b33 (patch)
tree45a4653b364164daa27529f295459012d238311b /etc/inc/services.inc
parent2706c79b47373fd294446d7ab0cc25d79bd494a1 (diff)
downloadpfsense-4f0710f32fc5be8e58b5608446933a0bd5ef7b33.zip
pfsense-4f0710f32fc5be8e58b5608446933a0bd5ef7b33.tar.gz
Use the name of the interface (lan, opt1, etc) rather than a loop-derived number for the DHCP failover peer name. This should be more accurate in cases where DHCP changes for interfaces happen out of order on CARP clusters, or when somehow an interface's configuration exists on one but not the other.
Diffstat (limited to 'etc/inc/services.inc')
-rw-r--r--etc/inc/services.inc9
1 files changed, 2 insertions, 7 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 49a05fe..169d37f 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -433,7 +433,6 @@ EOD;
/* loop through and determine if we need to setup
* failover peer "bleh" entries
*/
- $dhcpnum = 0;
foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) {
interfaces_staticarp_configure($dhcpif);
@@ -475,7 +474,7 @@ EOD;
$dhcpdconf_pri .= " mclt 600;\n";
}
$dhcpdconf .= <<<EOPP
-failover peer "dhcp{$dhcpnum}" {
+failover peer "dhcp_{$dhcpif}" {
{$type};
address {$intip};
port {$my_port};
@@ -488,12 +487,9 @@ failover peer "dhcp{$dhcpnum}" {
}
EOPP;
- $dhcpnum++;
}
}
- $dhcpnum = 0;
-
foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) {
$newzone = array();
@@ -620,8 +616,7 @@ EOPP;
$dhcpdconf .= " option routers {$poolconf['gateway']};\n";
if($dhcpifconf['failover_peerip'] <> "") {
- $dhcpdconf .= " failover peer \"dhcp{$dhcpnum}\";\n";
- $dhcpnum++;
+ $dhcpdconf .= " failover peer \"dhcp_{$dhcpif}\";\n";
}
$pdnscfg = "";
OpenPOWER on IntegriCloud