diff options
author | Chris Buechler <cmb@pfsense.org> | 2009-11-15 16:18:12 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2009-11-15 16:19:24 -0500 |
commit | 12fafaf755a9968306057952e63103ea034d7292 (patch) | |
tree | 8b1c45417c11b5312efc314ab9e7414a06fc9b74 | |
parent | 6593dae66735f668fb169cdbbf88ef9c1aa9241c (diff) | |
download | pfsense-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
-rw-r--r-- | etc/inc/interfaces.inc | 14 |
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 |