summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-01-06 14:10:47 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-01-06 14:11:14 -0200
commit81f1947666ebbe19f1f6579a1e5293c42c6d1c04 (patch)
treedf8d45ce2c8862eca85177a09c4f8df69c19f849 /usr/local/www/system_gateways_edit.php
parent30e2adbc04d37bf66bd4e0cce675d12fd3120f5a (diff)
downloadpfsense-81f1947666ebbe19f1f6579a1e5293c42c6d1c04.zip
pfsense-81f1947666ebbe19f1f6579a1e5293c42c6d1c04.tar.gz
Add an option to force a gateway to be down, it fixes #2847
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 1911921..429e4cc 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -75,6 +75,7 @@ if (isset($id) && $a_gateways[$id]) {
$pconfig['dynamic'] = true;
$pconfig['gateway'] = $a_gateways[$id]['gateway'];
$pconfig['defaultgw'] = isset($a_gateways[$id]['defaultgw']);
+ $pconfig['force_down'] = isset($a_gateways[$id]['force_down']);
$pconfig['latencylow'] = $a_gateways[$id]['latencylow'];
$pconfig['latencyhigh'] = $a_gateways[$id]['latencyhigh'];
$pconfig['losslow'] = $a_gateways[$id]['losslow'];
@@ -388,6 +389,8 @@ if ($_POST) {
$gateway['descr'] = $_POST['descr'];
if ($_POST['monitor_disable'] == "yes")
$gateway['monitor_disable'] = true;
+ if ($_POST['force_down'] == "yes")
+ $gateway['force_down'] = true;
if (is_ipaddr($_POST['monitor']))
$gateway['monitor'] = $_POST['monitor'];
@@ -596,6 +599,14 @@ function monitor_change() {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Mark Gateway as Down"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="force_down" type="checkbox" id="force_down" value="yes" <?php if ($pconfig['force_down'] == true) echo "checked=\"checked\""; ?> />
+ <strong><?=gettext("Mark Gateway as Down"); ?></strong><br />
+ <?=gettext("This will force this gateway to be considered Down"); ?>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Advanced");?></td>
<td width="78%" class="vtable">
<?php $showbutton = (!empty($pconfig['latencylow']) || !empty($pconfig['latencyhigh']) || !empty($pconfig['losslow']) || !empty($pconfig['losshigh']) || (isset($pconfig['weight']) && $pconfig['weight'] > 1) || (isset($pconfig['interval']) && ($pconfig['interval'] > $apinger_default['interval'])) || (isset($pconfig['down']) && !($pconfig['down'] == $apinger_default['down']))); ?>
OpenPOWER on IntegriCloud