diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-10-23 13:38:15 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-10-23 13:38:15 -0400 |
commit | a71b32d2495680306f22dff95855da79e35ec56c (patch) | |
tree | dca231bda47b908adfabaf2081635c07ce5977bd /usr/local/www/carp_status.php | |
parent | 27625b391f1118697477d0cd024710c7779b37a2 (diff) | |
download | pfsense-a71b32d2495680306f22dff95855da79e35ec56c.zip pfsense-a71b32d2495680306f22dff95855da79e35ec56c.tar.gz |
Unbreak CARP Enable/Disable button
Diffstat (limited to 'usr/local/www/carp_status.php')
-rwxr-xr-x | usr/local/www/carp_status.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index f2dd95a..1792f5d 100755 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -54,11 +54,12 @@ unset($interface_ip_arr_cache); $status = get_carp_status(); if($_POST['disablecarp'] <> "") { if($status == true) { - $carp_counter=find_number_of_created_carp_interfaces(); + $carp_ints = get_all_carp_interfaces(); mwexec("/sbin/sysctl net.inet.carp.allow=0"); - for($x=0; $x<$carp_counter; $x++) { - mwexec("/sbin/ifconfig carp{$x} down"); - mwexec("/sbin/ifconfig carp{$x} destroy"); + $carp_counter = find_number_of_created_carp_interfaces(); + foreach($carp_ints as $int) { + mwexec("/sbin/ifconfig $int down"); + mwexec("/sbin/ifconfig $int destroy"); } $savemsg = "{$carp_counter} IPs have been disabled."; } else { |