summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-04-12 22:43:33 +0700
committergnhb <gnoahb@gmail.com>2010-04-12 22:43:33 +0700
commiteca1f1ead81747afc1226610b4d2fe30e718706a (patch)
tree50c9b92565a624d5f7cb85bdc1ccd2d76057c577
parentd32a40c1c6eb3d9de1f3ed2d958298aedfae16ea (diff)
parent00c827829ba1100be39dbd5508718903a07f11c8 (diff)
downloadpfsense-eca1f1ead81747afc1226610b4d2fe30e718706a.zip
pfsense-eca1f1ead81747afc1226610b4d2fe30e718706a.tar.gz
Merge branch 'master' of rcs.pfsense.org:pfsense/mainline
-rw-r--r--etc/inc/filter.inc2
-rwxr-xr-xusr/local/www/firewall_rules.php21
-rwxr-xr-xusr/local/www/firewall_rules_edit.php2
-rw-r--r--usr/local/www/system_certmanager.php4
4 files changed, 15 insertions, 14 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 91ccb91..9f52c9e 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1574,7 +1574,7 @@ function filter_generate_user_rule($rule) {
isset($rule['max-src-conn-rates']) and $rule['max-src-conn-rates'] <> "" or
isset($rule['max-src-states']) and $rule['max-src-states'] <> "" or
isset($rule['statetimeout']) and $rule['statetimeout'] <> "" or
- isset($rule['l7container']) and $rule['l7container'] != "none") {
+ $l7_present) {
$aline['flags'] .= "( ";
if(isset($rule['source-track']) and $rule['source-track'] <> "")
$aline['flags'] .= "source-track rule ";
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 24dfb2c..af0fedb 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -70,14 +70,17 @@ function check_for_advaned_options(&$item) {
return $item_set;
}
-function delete_nat_association(&$a_nat, $id) {
- if (!$id || !is_array($a_nat))
+function delete_nat_association($id) {
+ global $config;
+
+ if (!$id || !is_array($config['nat']['rule']))
return;
- for ($pos = 0; $pos < sizeof($a_nat); $pos++) {
- if ($a_nat[$pos]['associated-rule-id'] == $id)
- $a_nat[$pos]['associated-rule-id'] = '';
- }
+ $a_nat = &$config['nat']['rule'];
+
+ foreach ($a_nat as &$natent)
+ if ($natent['associated-rule-id'] == $id)
+ $natent['associated-rule-id'] = '';
}
if (!is_array($config['filter']['rule'])) {
@@ -147,8 +150,7 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_filter[$_GET['id']]) {
if (!empty($a_filter[$_GET['id']]['associated-rule-id'])) {
- $a_nat = &$config['nat']['rule'];
- delete_nat_association($a_nat, $a_filter[$_GET['id']]['associated-rule-id']);
+ delete_nat_association($a_filter[$_GET['id']]['associated-rule-id']);
}
unset($a_filter[$_GET['id']]);
write_config();
@@ -161,9 +163,8 @@ if ($_GET['act'] == "del") {
if (isset($_POST['del_x'])) {
/* delete selected rules */
if (is_array($_POST['rule']) && count($_POST['rule'])) {
- $a_nat = &$config['nat']['rule'];
foreach ($_POST['rule'] as $rulei) {
- delete_nat_association($a_nat, $a_filter[$rulei]['associated-rule-id']);
+ delete_nat_association($a_filter[$rulei]['associated-rule-id']);
unset($a_filter[$rulei]);
}
write_config();
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index a41bcb2..e88ac6a 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -1252,7 +1252,7 @@ include("head.inc");
<select name="l7container">
<?php
if (!is_array($l7clist))
- $dnqlist = array();
+ $l7clist = array();
echo "<option value=\"none\"";
echo " >none</option>";
foreach ($l7clist as $l7ckey) {
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index eb3ac65..03458e9 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -528,7 +528,7 @@ function internalca_change() {
&nbsp;
<em>ex:</em>
&nbsp;
- www.pfsense.org
+ www.example.com
</td>
</tr>
</table>
@@ -625,7 +625,7 @@ function internalca_change() {
&nbsp;
<em>ex:</em>
&nbsp;
- www.pfsense.org
+ www.example.com
</td>
</tr>
</table>
OpenPOWER on IntegriCloud