summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-03-20 18:54:51 +0000
committerErmal <eri@pfsense.org>2014-03-20 18:54:51 +0000
commit00a6fcb7fbaaeb070a6279874a85b74015efa2b4 (patch)
treedfc766e33e8261beddd4d20d11dc75acb6251534
parenta63e5eadefbbe0e9a6283d411ad1f583d8cf6d99 (diff)
downloadpfsense-00a6fcb7fbaaeb070a6279874a85b74015efa2b4.zip
pfsense-00a6fcb7fbaaeb070a6279874a85b74015efa2b4.tar.gz
Configure first the vhid and than pass the vhid when configuring the carp this makes the ip assigned to carp as well
-rw-r--r--etc/inc/interfaces.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 90dcf10..3112767 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2174,12 +2174,12 @@ function interface_carp_configure(&$vip) {
if (!empty($vip['advbase']))
$advbase = "advbase " . escapeshellarg($vip['advbase']);
+ 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");
+ 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']));
-
- mwexec("/sbin/ifconfig {$realif} vhid " . escapeshellarg($vip['vhid']) . " advskew " . escapeshellarg($vip['advskew']) . " {$advbase} {$password}");
+ mwexec("/sbin/ifconfig {$realif} inet6 " . escapeshellarg($vip['subnet']) . " prefixlen " . escapeshellarg($vip['subnet_bits']) . " vhid " . escapeshellarg($vip['vhid']));
return $realif;
}
OpenPOWER on IntegriCloud