summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-07-29 21:02:05 +0000
committerErmal <eri@pfsense.org>2010-07-29 21:02:05 +0000
commit34525fefe1936d1bc12ffd1afd0a2428e5e80f7b (patch)
treee33616f4da517ab17b9e9232c3938e08a8e5c276 /usr/local
parentca7b7f7eb0b63c33a3a43335f68a11271a857c78 (diff)
downloadpfsense-34525fefe1936d1bc12ffd1afd0a2428e5e80f7b.zip
pfsense-34525fefe1936d1bc12ffd1afd0a2428e5e80f7b.tar.gz
Show all tables present in the tables ruleset on the diag overload tables.
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/diag_overload_tables.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/local/www/diag_overload_tables.php b/usr/local/www/diag_overload_tables.php
index 03205a1..e4bba75 100644
--- a/usr/local/www/diag_overload_tables.php
+++ b/usr/local/www/diag_overload_tables.php
@@ -48,12 +48,9 @@ require_once("guiconfig.inc");
// Set default table
$tablename = "sshlockout";
-if($_REQUEST['type'] == "sshlockout")
- $tablename = "sshlockout";
+if($_REQUEST['type'])
+ $tablename = $_REQUEST['type'];
-if($_REQUEST['type'] == "virusprot")
- $tablename = "virusprot";
-
if($_REQUEST['delete']) {
if(is_ipaddr($_REQUEST['delete'])) {
exec("/sbin/pfctl -t " . escapeshellarg($_REQUEST['type']) . " -T delete " . escapeshellarg($_REQUEST['delete']), $delete);
@@ -73,6 +70,7 @@ if($_REQUEST['deleteall']) {
}
exec("/sbin/pfctl -t $tablename -T show", $entries);
+exec("/sbin/pfctl -sT", $tables);
include("head.inc");
include("fbegin.inc");
@@ -98,8 +96,13 @@ include("fbegin.inc");
<?=gettext("Table");?>:
<select id='type' onChange='method_change($F("type"));' name='type'>
- <option name='sshlockout' value='sshlockout' <?php if ($tablename == "sshlockout") echo " selected ";?>>sshlockout</option>
- <option name='virusprot' value='virusprot' <?php if ($tablename == "virusprot") echo " selected ";?>>virusprot</option>
+ <?php foreach ($tables as $table) {
+ echo "<option name='{$table}' value='{$table}'";
+ if ($tablename == $table)
+ echo " selected ";
+ echo ">{$table}</option>\n";
+ }
+ ?>
</select>
<p/>
OpenPOWER on IntegriCloud