Fixes #3967, properly resolve interface
This commit is contained in:
parent
992f60d0fb
commit
94115b9313
|
@ -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);
|
||||
}
|
||||
|
|
Reference in New Issue