summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-04-26 14:23:29 +0000
committerErmal Luçi <eri@pfsense.org>2009-04-26 14:23:29 +0000
commit60120e37425e3e0147bbc3a0cfe010c124ba0df6 (patch)
tree2cdc7f3f4574ed10933035e38dd04533354e4c7d /usr/local/www
parent6dc3a5c2e428a6f8c0d11d904f12ab8ab86a8718 (diff)
downloadpfsense-60120e37425e3e0147bbc3a0cfe010c124ba0df6.zip
pfsense-60120e37425e3e0147bbc3a0cfe010c124ba0df6.tar.gz
* Convert schedules to pf(4).
This allows to schedule the whole feature of the rules like queues/limiters/gateways/blocks/allows/etc... * Whitespace cleaning on filter.inc * Move schedule backend logic from pfsense-utils.inc to filter.inc and prefix with filter_. * Small bugfixes here and there.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_rules.php2
-rwxr-xr-xusr/local/www/firewall_rules_edit.php1
-rw-r--r--usr/local/www/firewall_rules_schedule_logic.php10
-rw-r--r--usr/local/www/firewall_schedule.php2
-rw-r--r--usr/local/www/firewall_schedule_edit.php6
5 files changed, 8 insertions, 13 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index ab355f0..0bce648 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -389,7 +389,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
foreach ($a_schedules as $schedule)
{
if ($schedule['name'] == $filterent['sched'] ){
- $schedstatus = get_time_based_rule_status($schedule);
+ $schedstatus = filter_get_time_based_rule_status($schedule);
foreach($schedule['timerange'] as $timerange) {
$tempFriendlyTime = "";
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index e50bcb4..5ea594b 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -979,7 +979,6 @@ include("head.inc");
}?>
</select>
<p>Leave as 'none' to leave the rule enabled all the time.</p>
- <strong>NOTE: schedule logic can be a bit different. Click <a target="_new" href='firewall_rules_schedule_logic.php'>here</a> for more information.</strong>
</td>
</tr>
diff --git a/usr/local/www/firewall_rules_schedule_logic.php b/usr/local/www/firewall_rules_schedule_logic.php
deleted file mode 100644
index f93436d..0000000
--- a/usr/local/www/firewall_rules_schedule_logic.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<pre>
-When working with {$g['product_name']} based schedules, the logic is a bit different from the normal {$g['product_name']} rules.
-
-For example, the rules are evaluated from top to bottom.
-
-If you have a pass rule and the rule is outside of the schedule, the traffic will be BLOCKED regardless
-of pass rules that occur after this rule.
-
-In these cases you will want to change the pass rule to a block style rule to get the needed functionality.
-</pre> \ No newline at end of file
diff --git a/usr/local/www/firewall_schedule.php b/usr/local/www/firewall_schedule.php
index d457bdb..a5eaf23 100644
--- a/usr/local/www/firewall_schedule.php
+++ b/usr/local/www/firewall_schedule.php
@@ -107,7 +107,7 @@ include("head.inc");
<tr>
<td class="listlr" ondblclick="document.location='firewall_schedule_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($schedule['name']);
- $schedstatus = get_time_based_rule_status($schedule);
+ $schedstatus = filter_get_time_based_rule_status($schedule);
if ($schedstatus) { ?>
&nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="Schedule is currently active" width="17" height="17" border="0">
<?php } ?>
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index 3cda9a9..fc30c18 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -65,6 +65,7 @@ if (isset($id) && $a_schedules[$id]) {
$pconfig['name'] = $a_schedules[$id]['name'];
$pconfig['descr'] = html_entity_decode($a_schedules[$id]['descr']);
$pconfig['timerange'] = $a_schedules[$id]['timerange'];
+ $pconfig['schedlabel'] = $a_schedules[$id]['schedlabel'];
$getSchedule = true;
}
@@ -152,6 +153,11 @@ if ($_POST) {
if (!$input_errors) {
+ if (!empty($pconfig['schedlabel']))
+ $schedule['schedlabel'] = $pconfig['schedlabel'];
+ else
+ $schedule['schedlabel'] = uniqid();
+
if (isset($id) && $a_schedules[$id]){
$a_schedules[$id] = $schedule;
}
OpenPOWER on IntegriCloud