mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Configure first the vhid and than pass the vhid when configuring the carp this makes the ip assigned to carp as well
This commit is contained in:
parent
a63e5eadef
commit
00a6fcb7fb
@ -2174,13 +2174,13 @@ function interface_carp_configure(&$vip) {
|
||||
if (!empty($vip['advbase']))
|
||||
$advbase = "advbase " . escapeshellarg($vip['advbase']);
|
||||
|
||||
if (is_ipaddrv4($vip['subnet']))
|
||||
mwexec("/sbin/ifconfig {$realif} " . escapeshellarg($vip['subnet']) . "/" . escapeshellarg($vip['subnet_bits']) . " alias");
|
||||
else if (is_ipaddrv6($vip['subnet']))
|
||||
mwexec("/sbin/ifconfig {$realif} inet6 " . escapeshellarg($vip['subnet']) . " prefixlen " . escapeshellarg($vip['subnet_bits']));
|
||||
|
||||
mwexec("/sbin/ifconfig {$realif} vhid " . escapeshellarg($vip['vhid']) . " advskew " . escapeshellarg($vip['advskew']) . " {$advbase} {$password}");
|
||||
|
||||
if (is_ipaddrv4($vip['subnet']))
|
||||
mwexec("/sbin/ifconfig {$realif} " . escapeshellarg($vip['subnet']) . "/" . escapeshellarg($vip['subnet_bits']) . " alias vhid " . escapeshellarg($vip['vhid']));
|
||||
else if (is_ipaddrv6($vip['subnet']))
|
||||
mwexec("/sbin/ifconfig {$realif} inet6 " . escapeshellarg($vip['subnet']) . " prefixlen " . escapeshellarg($vip['subnet_bits']) . " vhid " . escapeshellarg($vip['vhid']));
|
||||
|
||||
return $realif;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user