diff options
author | jim-p <jimp@pfsense.org> | 2013-06-18 15:54:20 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-06-18 15:55:57 -0400 |
commit | d5e4f7c947b3c4143eeabd78a5093e17b2805521 (patch) | |
tree | 614a295feee6089caed4ffd081f37c00a253a578 /etc/inc | |
parent | 40e6086ada6b73f6432b7ac93d4b376941028b09 (diff) | |
download | pfsense-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')
-rw-r--r-- | etc/inc/services.inc | 9 |
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 = ""; |