summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-06-21 19:39:31 -0500
committerChris Buechler <cmb@pfsense.org>2016-06-21 19:40:40 -0500
commitac3e3baa6ebde0dba2e3f43295b25dfa809e905e (patch)
tree34dc52e846fa10a7573253b68e5ca6a5d2211f61 /src
parentfb0ecb7a1dfcc71c0c2da2d165d00a4663da9984 (diff)
downloadpfsense-ac3e3baa6ebde0dba2e3f43295b25dfa809e905e.zip
pfsense-ac3e3baa6ebde0dba2e3f43295b25dfa809e905e.tar.gz
Only call interfaces_vips_configure once if it's needed, rather than doing the same thing over and over for every VIP on an interface. Ticket #6515
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/interfaces.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index c5d030f..2e1eb5b 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -5064,6 +5064,7 @@ function link_interface_to_vlans($int, $action = "") {
function link_interface_to_vips($int, $action = "", $vhid = '') {
global $config;
+ $updatevips = false;
if (is_array($config['virtualip']['vip'])) {
$result = array();
foreach ($config['virtualip']['vip'] as $vip) {
@@ -5076,7 +5077,7 @@ function link_interface_to_vips($int, $action = "", $vhid = '') {
continue;
}
if ($action == "update") {
- interfaces_vips_configure($int);
+ $updatevips = true;
} else {
if (empty($vhid) || ($vhid == $vip['vhid']) ||
substr($vip['interface'], 0, 4) == "_vip") {
@@ -5084,6 +5085,9 @@ function link_interface_to_vips($int, $action = "", $vhid = '') {
}
}
}
+ if ($updatevips === true) {
+ interfaces_vips_configure($int);
+ }
return $result;
}
OpenPOWER on IntegriCloud