summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2009-11-15 16:18:12 -0500
committerChris Buechler <cmb@pfsense.org>2009-11-15 16:19:24 -0500
commit12fafaf755a9968306057952e63103ea034d7292 (patch)
tree8b1c45417c11b5312efc314ab9e7414a06fc9b74 /etc
parent6593dae66735f668fb169cdbbf88ef9c1aa9241c (diff)
downloadpfsense-12fafaf755a9968306057952e63103ea034d7292.zip
pfsense-12fafaf755a9968306057952e63103ea034d7292.tar.gz
I see no reason to retain this "braindeadedness". Create each CARP VIP with its VHID, and destroy accordingly.
Resolves #151
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 5da9f2a..84dc1d1 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -786,6 +786,11 @@ function interface_vip_bring_down(&$vip) {
mwexec("/sbin/ifconfig " . get_real_interface($vip['interface']) . " delete {$vip['subnet']}");
break;
case "carp":
+ $vipif = "vip" . $vip['vhid'];
+ mwexec("/sbin/ifconfig {$vipif} delete");
+ mwexec("/sbin/ifconfig {$vipif} down");
+ mwexec("/sbin/ifconfig {$vipif} destroy");
+ break;
case "carpdev-dhcp":
$vipif = "vip" . $vip['vhid'];
mwexec("/sbin/ifconfig {$vipif} delete");
@@ -1180,11 +1185,8 @@ function interface_carp_configure(&$vip) {
if ($vip['password'] != "")
$password = " pass \"" . $vip_password . "\"";
- // This is the most brain dead decision taken for carp
- // Carp vhid is confirmed by GUI to be sequencial and limited to 256
- // eri@ I am leaving the comment but not touching the code
- // since someone thinks he/she knows better.
- $vipif = find_next_available_vip();
+ // set the vip interface to the vhid
+ $vipif = "vip{$vip['vhid']}";
$interface = interface_translate_type_to_real($vip['interface']);
/*
@@ -2815,4 +2817,4 @@ function setup_pppoe_reset_file($interface, $status) {
unlink_if_exists(CRON_PPPOE_CMD_FILE);
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud