summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-28 23:24:15 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-28 23:24:15 +0000
commit3f00c1dc9f61e1226a732c5daf325384794095d9 (patch)
tree0e3837ad0f1c387cfb4217aea6dc8f03d601bab8 /usr
parent20cbc4ece50a8121b51c4f2e310d2f24e1c35e05 (diff)
downloadpfsense-3f00c1dc9f61e1226a732c5daf325384794095d9.zip
pfsense-3f00c1dc9f61e1226a732c5daf325384794095d9.tar.gz
unless both max-src-conn-rate and max-src-conn-rates are provided, unset the values - ticket #650
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 451040a..441c4d7 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -258,8 +258,15 @@ if ($_POST) {
$filterent['statetimeout'] = $_POST['statetimeout'];
$filterent['statetype'] = $_POST['statetype'];
$filterent['os'] = $_POST['os'];
- $filterent['max-src-conn-rate'] = $_POST['max-src-conn-rate'];
- $filterent['max-src-conn-rates'] = $_POST['max-src-conn-rates'];
+
+ /* unless both values are provided, unset the values - ticket #650 */
+ if($_POST['max-src-conn-rate'] <> "" and $_POST['max-src-conn-rates'] <> "") {
+ $filterent['max-src-conn-rate'] = $_POST['max-src-conn-rate'];
+ $filterent['max-src-conn-rates'] = $_POST['max-src-conn-rates'];
+ } else {
+ unset($filterent['max-src-conn-rate']);
+ unset($filterent['max-src-conn-rates']);
+ }
if ($_POST['proto'] != "any")
$filterent['protocol'] = $_POST['proto'];
OpenPOWER on IntegriCloud