Make sure to account for IP aliases on lo0 here, or they get duplicated on each CARP sync

This commit is contained in:
jim-p 2013-09-11 14:32:36 -04:00
parent 1e2cb1f88e
commit 049d42115f
1 changed files with 2 additions and 2 deletions

View File

@ -202,9 +202,9 @@ function restore_config_section_xmlrpc($raw_params) {
foreach ($config['virtualip']['vip'] as $vipindex => $vip) {
if ($vip['mode'] == "carp")
$oldvips["{$vip['interface']}_vip{$vip['vhid']}"] = "{$vip['password']}{$vip['advskew']}{$vip['subnet']}{$vip['subnet_bits']}{$vip['advbase']}";
else if ($vip['mode'] == "ipalias" && strstr($vip['interface'], "_vip"))
else if ($vip['mode'] == "ipalias" && (strstr($vip['interface'], "_vip") || strstr($vip['interface'], "lo0")))
$oldvips[$vip['subnet']] = "{$vip['interface']}{$vip['subnet']}{$vip['subnet_bits']}";
else if (($vip['mode'] == "ipalias" || $vip['mode'] == 'proxyarp') && !strstr($vip['interface'], "_vip"))
else if (($vip['mode'] == "ipalias" || $vip['mode'] == 'proxyarp') && !(strstr($vip['interface'], "_vip") || strstr($vip['interface'], "lo0")))
$vipbackup[] = $vip;
}
}