summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-19 06:03:22 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-19 06:03:22 +0000
commit25b71fd431e57887b41a3b4ba7bd50b5ee2932c7 (patch)
tree0c1d0bcf277ad90859c2845d14e1a95bce93eaf4 /usr/local/www
parenta88aca620fe2a1c543986c764fdd54cde41fd265 (diff)
downloadpfsense-25b71fd431e57887b41a3b4ba7bd50b5ee2932c7.zip
pfsense-25b71fd431e57887b41a3b4ba7bd50b5ee2932c7.tar.gz
MFC 7282
Stop FTP helper for NAT redirects upon deletion of rule.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_nat.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index 4419f48..9b54db2 100755
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -37,7 +37,6 @@ if (!is_array($config['nat']['rule']))
$config['nat']['rule'] = array();
$a_nat = &$config['nat']['rule'];
-//nat_rules_sort();
if ($_POST) {
@@ -71,6 +70,12 @@ if (isset($_POST['del_x'])) {
/* 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");
+ if(!$helpers) {
+ /* install a pftpx helper, do not set a rule */
+ mwexec("/bin/kill {$helpers}");
+ }
unset($a_nat[$rulei]);
}
write_config();
OpenPOWER on IntegriCloud