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:55:57 -0400
commitd5e4f7c947b3c4143eeabd78a5093e17b2805521 (patch)
tree614a295feee6089caed4ffd081f37c00a253a578 /etc/inc/services.inc
parent40e6086ada6b73f6432b7ac93d4b376941028b09 (diff)
downloadpfsense-d5e4f7c947b3c4143eeabd78a5093e17b2805521.zip
pfsense-d5e4f7c947b3c4143eeabd78a5093e17b2805521.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 1ad80ee..c2f6189 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