summaryrefslogtreecommitdiffstats
path: root/etc/inc/services.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-06-10 13:32:42 -0400
committerjim-p <jimp@pfsense.org>2010-06-10 13:33:48 -0400
commit85b13495d8215b2c4f6f7eb68d2742ebecf7919c (patch)
tree228fb0d91742ab4f8b403df1fb25ffd4d2901a91 /etc/inc/services.inc
parent328763746156a97200c0b10ca0f2551523181009 (diff)
downloadpfsense-85b13495d8215b2c4f6f7eb68d2742ebecf7919c.zip
pfsense-85b13495d8215b2c4f6f7eb68d2742ebecf7919c.tar.gz
Don't perform these multiple times as they do not change on each loop iteration. Having them inside the loop can also generate an invalid DHCP config file, instead of just warning that there is no CARP VIP defined.
Diffstat (limited to 'etc/inc/services.inc')
-rw-r--r--etc/inc/services.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 94f69cd..4f2f167 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -143,6 +143,9 @@ EOD;
$dhcpdconf .= "authoritative;\n";
if($dhcpifconf['failover_peerip'] <> "") {
+ $int = guess_interface_from_ip($dhcpifconf['failover_peerip']);
+ $intip = find_interface_ip($int);
+ $real_dhcpif = convert_friendly_interface_to_real_interface_name($dhcpif);
/*
* yep, failover peer is defined.
* does it match up to a defined vip?
@@ -151,9 +154,6 @@ EOD;
$a_vip = &$config['virtualip']['vip'];
if(is_array($a_vip)) {
foreach ($a_vip as $vipent) {
- $int = guess_interface_from_ip($dhcpifconf['failover_peerip']);
- $intip = find_interface_ip($int);
- $real_dhcpif = convert_friendly_interface_to_real_interface_name($dhcpif);
if($int == $real_dhcpif) {
/* this is the interface! */
if($vipent['advskew'] < "20")
OpenPOWER on IntegriCloud