From 855d186191ab74ee7d43c115bcae3bdd20ab19af Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 23 Dec 2008 21:54:49 +0000 Subject: [PATCH] * Use correct ftp-proxy arguments --- etc/inc/filter.inc | 4 ++-- usr/local/www/firewall_nat_1to1_edit.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 3ecdc0c4b0..06f1a98cd1 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -569,13 +569,13 @@ function filter_nat_rules_generate() if($int && $external_address && $internal_address) { $natrules .= "# FTP Helper binat\n"; $natrules .= "no binat on {$int} proto tcp from any to {$external_address} port 21\n"; - $helpers = exec("/bin/ps awux | grep \"\-p 21 {$internal_address} {$external_address}\" | grep -v grep"); + $helpers = exec("/bin/ps awux | grep \"\-p 21 -R {$internal_address} -b {$external_address}\" | grep -v grep"); if(!$helpers) { /* Get the ftp queue for this interface */ if (isset($config['interfaces'][$rule['interface']]['ftpqueue'])) $shaper_queue = $config['interfaces'][$rule['interface']]['ftpqueue']; /* else default queue configured on shaper will get this */ - $after_filter_configure_run[] = "/usr/local/sbin/ftp-proxy {$shaper_queue} -p 21 {$internal_address} {$external_address} -T PFFTPPROXY"; + $after_filter_configure_run[] = "/usr/local/sbin/ftp-proxy {$shaper_queue} -p 21 -R {$internal_address} -b {$external_address} -T PFFTPPROXY"; } } } diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php index 010d10bdb5..c814d50dfb 100755 --- a/usr/local/www/firewall_nat_1to1_edit.php +++ b/usr/local/www/firewall_nat_1to1_edit.php @@ -122,7 +122,7 @@ if ($_POST) { if($a_1to1[$id]['useftphelper']) { if($a_1to1[$id]['external'] != $_POST['external'] or $a_1to1[$id]['internal'] != $_POST['internal'] or !$_POST['useftphelper']) { - $helpers = `/bin/ps awux | grep "p 21 {$a_1to1[$id]['internal']} {$a_1to1[$id]['external']}" | grep -v grep | awk '{ print $2 }'`; + $helpers = `/bin/ps awux | grep "p 21 -R {$a_1to1[$id]['internal']} -b {$a_1to1[$id]['external']}" | grep -v grep | awk '{ print $2 }'`; if($helpers) exec("kill $helpers"); }