Revision ac3e3baa
Added by Chris Buechler about 9 years ago
src/etc/inc/interfaces.inc | ||
---|---|---|
5064 | 5064 |
function link_interface_to_vips($int, $action = "", $vhid = '') { |
5065 | 5065 |
global $config; |
5066 | 5066 |
|
5067 |
$updatevips = false; |
|
5067 | 5068 |
if (is_array($config['virtualip']['vip'])) { |
5068 | 5069 |
$result = array(); |
5069 | 5070 |
foreach ($config['virtualip']['vip'] as $vip) { |
... | ... | |
5076 | 5077 |
continue; |
5077 | 5078 |
} |
5078 | 5079 |
if ($action == "update") { |
5079 |
interfaces_vips_configure($int);
|
|
5080 |
$updatevips = true;
|
|
5080 | 5081 |
} else { |
5081 | 5082 |
if (empty($vhid) || ($vhid == $vip['vhid']) || |
5082 | 5083 |
substr($vip['interface'], 0, 4) == "_vip") { |
... | ... | |
5084 | 5085 |
} |
5085 | 5086 |
} |
5086 | 5087 |
} |
5088 |
if ($updatevips === true) { |
|
5089 |
interfaces_vips_configure($int); |
|
5090 |
} |
|
5087 | 5091 |
return $result; |
5088 | 5092 |
} |
5089 | 5093 |
|
Also available in: Unified diff
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