summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_resetstate.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-04-19 18:00:00 +0545
committerPhil Davis <phil.davis@inf.org>2015-04-19 18:00:00 +0545
commit5f6010605ba8e3ab2fbc27080ec2db80dbd0e32e (patch)
treecd25c71caf551eb882f460ac6e1c32c8220fe58f /usr/local/www/diag_resetstate.php
parent0608bd3c354ea76eb6df9ed9322e2ef8686f15e7 (diff)
downloadpfsense-5f6010605ba8e3ab2fbc27080ec2db80dbd0e32e.zip
pfsense-5f6010605ba8e3ab2fbc27080ec2db80dbd0e32e.tar.gz
Code style usr-local-www diag
Diffstat (limited to 'usr/local/www/diag_resetstate.php')
-rw-r--r--usr/local/www/diag_resetstate.php126
1 files changed, 66 insertions, 60 deletions
diff --git a/usr/local/www/diag_resetstate.php b/usr/local/www/diag_resetstate.php
index 88da499..07d3575 100644
--- a/usr/local/www/diag_resetstate.php
+++ b/usr/local/www/diag_resetstate.php
@@ -50,14 +50,16 @@ if ($_POST) {
$savemsg = "";
if ($_POST['statetable']) {
filter_flush_state_table();
- if ($savemsg)
+ if ($savemsg) {
$savemsg .= " ";
+ }
$savemsg .= gettext("The state table has been flushed successfully.");
}
if ($_POST['sourcetracking']) {
mwexec("/sbin/pfctl -F Sources");
- if ($savemsg)
+ if ($savemsg) {
$savemsg .= " <br />";
+ }
$savemsg .= gettext("The source tracking table has been flushed successfully.");
}
}
@@ -70,67 +72,71 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
- <form action="diag_resetstate.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="reset states">
- <tr><td>
- <?php
- $tab_array = array();
- $tab_array[] = array(gettext("States"), false, "diag_dump_states.php");
- if (isset($config['system']['lb_use_sticky']))
- $tab_array[] = array(gettext("Source Tracking"), false, "diag_dump_states_sources.php");
- $tab_array[] = array(gettext("Reset States"), true, "diag_resetstate.php");
- display_top_tabs($tab_array);
- ?>
- </td></tr>
- <tr><td class="tabcont">
-
- <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
- <tr>
- <td width="22%" valign="top" class="vtable">&nbsp;</td>
- <td width="78%" class="vtable"> <p>
- <input name="statetable" type="checkbox" id="statetable" value="yes" checked="checked" />
- <strong><?= gettext("Firewall state table"); ?></strong><br />
- <span class="vexpl"><br />
- <?=gettext("Resetting the state tables will remove all entries from " .
- "the corresponding tables. This means that all open connections " .
- "will be broken and will have to be re-established. This " .
- "may be necessary after making substantial changes to the " .
- "firewall and/or NAT rules, especially if there are IP protocol " .
- "mappings (e.g. for PPTP or IPv6) with open connections."); ?><br />
- <br />
- </span><span class="vexpl"><?=gettext("The firewall will normally leave " .
- "the state tables intact when changing rules."); ?><br />
- <br />
- <?=gettext("NOTE: If you reset the firewall state table, the browser " .
- "session may appear to be hung after clicking &quot;Reset&quot;. " .
- "Simply refresh the page to continue."); ?></span></p>
- </td>
+<form action="diag_resetstate.php" method="post" name="iform" id="iform">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="reset states">
+ <tr>
+ <td>
+ <?php
+ $tab_array = array();
+ $tab_array[] = array(gettext("States"), false, "diag_dump_states.php");
+ if (isset($config['system']['lb_use_sticky'])) {
+ $tab_array[] = array(gettext("Source Tracking"), false, "diag_dump_states_sources.php");
+ }
+ $tab_array[] = array(gettext("Reset States"), true, "diag_resetstate.php");
+ display_top_tabs($tab_array);
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="tabcont">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
+ <tr>
+ <td width="22%" valign="top" class="vtable">&nbsp;</td>
+ <td width="78%" class="vtable"> <p>
+ <input name="statetable" type="checkbox" id="statetable" value="yes" checked="checked" />
+ <strong><?= gettext("Firewall state table"); ?></strong><br />
+ <span class="vexpl"><br />
+ <?=gettext("Resetting the state tables will remove all entries from " .
+ "the corresponding tables. This means that all open connections " .
+ "will be broken and will have to be re-established. This " .
+ "may be necessary after making substantial changes to the " .
+ "firewall and/or NAT rules, especially if there are IP protocol " .
+ "mappings (e.g. for PPTP or IPv6) with open connections."); ?><br />
+ <br />
+ </span><span class="vexpl"><?=gettext("The firewall will normally leave " .
+ "the state tables intact when changing rules."); ?><br />
+ <br />
+ <?=gettext("NOTE: If you reset the firewall state table, the browser " .
+ "session may appear to be hung after clicking &quot;Reset&quot;. " .
+ "Simply refresh the page to continue."); ?></span></p>
+ </td>
</tr>
<?php if (isset($config['system']['lb_use_sticky'])): ?>
- <tr>
- <td width="22%" valign="top" class="vtable">&nbsp;</td>
- <td width="78%" class="vtable"><p>
- <input name="sourcetracking" type="checkbox" id="sourcetracking" value="yes" checked="checked" />
- <strong><?= gettext("Firewall Source Tracking"); ?></strong><br />
- <span class="vexpl"><br />
- <?=gettext("Resetting the source tracking table will remove all source/destination associations. " .
- "This means that the \"sticky\" source/destination association " .
- "will be cleared for all clients."); ?><br />
- <br />
- </span><span class="vexpl"><?=gettext("This does not clear active connection states, only source tracking."); ?><br />
- </p>
- </td>
- </tr>
+ <tr>
+ <td width="22%" valign="top" class="vtable">&nbsp;</td>
+ <td width="78%" class="vtable"><p>
+ <input name="sourcetracking" type="checkbox" id="sourcetracking" value="yes" checked="checked" />
+ <strong><?= gettext("Firewall Source Tracking"); ?></strong><br />
+ <span class="vexpl"><br />
+ <?=gettext("Resetting the source tracking table will remove all source/destination associations. " .
+ "This means that the \"sticky\" source/destination association " .
+ "will be cleared for all clients."); ?><br />
+ <br />
+ </span><span class="vexpl"><?=gettext("This does not clear active connection states, only source tracking."); ?><br />
+ </p>
+ </td>
+ </tr>
<?php endif; ?>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Reset"); ?>" />
- </td>
- </tr>
- </table>
- </td></tr>
- </table>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Reset"); ?>" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
</form>
<?php include("fend.inc"); ?>
</body>
OpenPOWER on IntegriCloud