Fixes #3967, properly resolve interface

This commit is contained in:
Ermal 2014-11-11 20:08:25 +01:00
parent 992f60d0fb
commit 94115b9313
1 changed files with 2 additions and 2 deletions

View File

@ -2166,12 +2166,12 @@ function interface_ipalias_configure(&$vip) {
$af = 'inet6';
$iface = $vip['interface'];
$vipadd = '';
if (stripos($vip['interface'], '_vip')) {
if (strpos($vip['interface'], '_vip')) {
$carpvip = get_configured_carp_interface_list($vip['interface'], $af, 'vip');
$iface = $carpvip['interface'];
$vipadd = "vhid {$carpvip['vhid']}";
}
$if = get_real_interface($vip['interface']);
$if = get_real_interface($iface);
mwexec("/sbin/ifconfig " . escapeshellarg($if) ." {$af} ". escapeshellarg($vip['subnet']) ."/" . escapeshellarg($vip['subnet_bits']) . " alias {$vipadd}");
unset($iface, $af, $if, $carpvip, $vipadd);
}