summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-08-19 22:13:18 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-08-19 22:13:18 +0000
commit4b9a670cd59251ca8d194455593d73102d19c77a (patch)
tree9c5fb083806232cff5ba996ffed753c988ce5015 /usr/local/www/firewall_nat.php
parent7d04082e098fab988c9091762cad7b455bfbd95b (diff)
downloadpfsense-4b9a670cd59251ca8d194455593d73102d19c77a.zip
pfsense-4b9a670cd59251ca8d194455593d73102d19c77a.tar.gz
Kill off pftpx helper correctly after rule deletion
Diffstat (limited to 'usr/local/www/firewall_nat.php')
-rwxr-xr-xusr/local/www/firewall_nat.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index e3f4e10..55084bb 100755
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -71,22 +71,22 @@ if ($_POST) {
}
if (isset($_POST['del_x'])) {
- /* delete selected rules */
- if (is_array($_POST['rule']) && count($_POST['rule'])) {
- foreach ($_POST['rule'] as $rulei) {
+ /* delete selected rules */
+ if (is_array($_POST['rule']) && count($_POST['rule'])) {
+ foreach ($_POST['rule'] as $rulei) {
$target = $rule['target'];
- $helpers = exec("/bin/ps auwx | grep pftpx | grep {$target} | grep -v grep | cut -d\" \" -f5");
+ $helpers = exec("/bin/ps awwux | grep pftpx | grep \"{$target}\" | grep -v grep | awk '{ print \$2 }'");
if($helpers) {
/* kill ftp proxy helper */
mwexec("/bin/kill {$helpers}");
}
- unset($a_nat[$rulei]);
- }
- write_config();
- touch($d_natconfdirty_path);
- header("Location: firewall_nat.php");
- exit;
- }
+ unset($a_nat[$rulei]);
+ }
+ write_config();
+ touch($d_natconfdirty_path);
+ header("Location: firewall_nat.php");
+ exit;
+ }
} else {
/* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */
OpenPOWER on IntegriCloud