diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-05 01:51:14 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-05 01:51:14 +0000 |
commit | 6e65863d80c775731a54249320a0518aa64a58af (patch) | |
tree | 4e6a0a410ba46f958665bc4fd1fa509bf4235edc /etc/inc | |
parent | cc5ceb40486e4c1dab8c0f3109936a7ef64e8850 (diff) | |
download | pfsense-6e65863d80c775731a54249320a0518aa64a58af.zip pfsense-6e65863d80c775731a54249320a0518aa64a58af.tar.gz |
Launch FTP helper correctly for NAT redirected ftp servers
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/filter.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 8618df6..a3c4479 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -357,10 +357,10 @@ function filter_nat_rules_generate_if($if, $src, $srcport, $dst, $natport, $targ * a ftp server then launch a helper */ if($dst <> "") { - if($natport == "21" and $config['system']['disableftpproxy'] <> "") { - $helpers = exec("ps awux | grep pftpx | grep {$dst} | cut -d\" \" -f5"); - mwexec("/bin/kill {$helpers}"); - mwexec_bg("/usr/local/sbin/pftpx -c 81 -f {$dst} -g 81"); + if($natport == "21" and !$config['system']['disableftpproxy']) { + $helpers = exec("ps awux | grep pftpx | grep {$dst}"); + if(!$helpers) + mwexec_bg("/usr/local/sbin/pftpx -c 81 -f {$dst} -g 81"); } } |