diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-28 23:24:15 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-28 23:24:15 +0000 |
commit | 3f00c1dc9f61e1226a732c5daf325384794095d9 (patch) | |
tree | 0e3837ad0f1c387cfb4217aea6dc8f03d601bab8 /usr | |
parent | 20cbc4ece50a8121b51c4f2e310d2f24e1c35e05 (diff) | |
download | pfsense-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-x | usr/local/www/firewall_rules_edit.php | 11 |
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']; |