mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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
This commit is contained in:
parent
fb0ecb7a1d
commit
ac3e3baa6e
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user