Example #1
0
                        case "proxyarp":
                            interface_proxyarp_configure($a_vip[$vid]['interface']);
                            break;
                        case "carp":
                            $check_carp = true;
                            interface_carp_configure($a_vip[$vid]);
                            break;
                        default:
                            break;
                    }
                }
            }
            @unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply");
        }
        /* Before changing check #4633 */
        if ($check_carp === true && !get_carp_status()) {
            set_single_sysctl("net.inet.carp.allow", "1");
        }
        $retval = 0;
        $retval |= filter_configure();
        $savemsg = get_std_save_message($retval);
        clear_subsystem_dirty('vip');
    }
}
if ($_GET['act'] == "del") {
    if ($a_vip[$_GET['id']]) {
        /* make sure no inbound NAT mappings reference this entry */
        if (is_array($config['nat']['rule'])) {
            foreach ($config['nat']['rule'] as $rule) {
                if ($rule['destination']['address'] != "") {
                    if ($rule['destination']['address'] == $a_vip[$_GET['id']]['subnet']) {
 *	NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 *	LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 *	HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 *	STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 *	OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *	====================================================================
 *
 */
$nocsrf = true;
require_once "guiconfig.inc";
require_once "pfsense-utils.inc";
require_once "functions.inc";
require_once "/usr/local/www/widgets/include/carp_status.inc";
$carp_enabled = get_carp_status();
?>
<div class="content">
<table class="table table-striped table-hover">
	<thead>
		<tr>
			<th>CARP Interface</th>
			<th>IP Address</th>
			<th>Status</th>
		</tr>
	</thead>
	<tbody>
<?php 
if (is_array($config['virtualip']['vip'])) {
    $carpint = 0;
    foreach ($config['virtualip']['vip'] as $carp) {
Example #3
0
                        interface_carpdev_configure($vip);
                        sleep(1);
                        break;
                    case "ipalias":
                        if (strstr($vip['interface'], "_vip")) {
                            interface_ipalias_configure($vip);
                        }
                        break;
                }
            }
        }
        interfaces_carp_setup();
        mwexec("/sbin/sysctl net.inet.carp.allow=1");
    }
}
$status = get_carp_status();
$pgtitle = array(gettext("Status"), gettext("CARP"));
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<form action="carp_status.php" method="post">
<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
?>