From 4f0710f32fc5be8e58b5608446933a0bd5ef7b33 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 18 Jun 2013 15:54:20 -0400 Subject: 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. --- etc/inc/services.inc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'etc/inc') 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 .= << $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 = ""; -- cgit v1.1