diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-11-10 11:40:54 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-11-10 11:40:54 +0000 |
commit | 51b14faaa149524ea71d92f091ed189419734c78 (patch) | |
tree | 98b8ed0525a879ae0a4fa8ff0d91153a7a101755 /usr | |
parent | 21d40ff93db15448b85e9f9744f087bcb0db6d2b (diff) | |
download | pfsense-51b14faaa149524ea71d92f091ed189419734c78.zip pfsense-51b14faaa149524ea71d92f091ed189419734c78.tar.gz |
Do not 'spam' a new ipfw-classifyd for each save. If we hit save for an existing configuration(did changes to existing one) just tell ipfw-classifyd to reload the config.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_shaper_layer7.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php index 84f3315..b9fb4f6 100755 --- a/usr/local/www/firewall_shaper_layer7.php +++ b/usr/local/www/firewall_shaper_layer7.php @@ -66,8 +66,6 @@ $default_layer7shaper_msg .= "</td></tr>"; read_layer7_config(); if($_GET['reset'] <> "") { - /* XXX: Huh!? Why are we killing php here? */ - mwexec("killall -9 pfctl php"); // kill all ipfw-classifyd processes mwexec("killall -9 ipfw-classifyd"); exit; @@ -124,8 +122,13 @@ else if ($_POST) { unset($input_errors); if($_POST['submit']) { - $l7r =& new layer7(); - $_POST['divert_port'] = $l7r->gen_divert_port(); + if (isset($layer7_rules_list[$name])) { + $l7r = $layer7_rules_list[$name]; + $_POST['divert_port'] = $l7r->GetRPort(); + } else { + $l7r =& new layer7(); + $_POST['divert_port'] = $l7r->gen_divert_port(); + } for($i=0; $_POST['protocol'][$i] <> ""; $i++) { $_POST['l7rules'][$i]['protocol'] = $_POST['protocol'][$i]; $_POST['l7rules'][$i]['structure'] = $_POST['structure'][$i]; |