summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-03-16 17:50:44 +0000
committerErmal Luçi <eri@pfsense.org>2009-03-16 17:50:44 +0000
commit049a688e5daac240b2651bbd2cc178612741d23a (patch)
treef76be91dfaf8e42e68aafaeb281a2eb83435e326 /etc/inc/config.inc
parentc9aee395d7baf8d472ad0b481dba099eb6674061 (diff)
downloadpfsense-049a688e5daac240b2651bbd2cc178612741d23a.zip
pfsense-049a688e5daac240b2651bbd2cc178612741d23a.tar.gz
Remove ftp-proxy/pftpx/ftpsesame references we handle all of this in kernel now.(yay!)
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc97
1 files changed, 1 insertions, 96 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index eb2daaa..c3cef03 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -1181,101 +1181,6 @@ EOD;
}
}
-function system_start_ftp_helpers() {
- require_once("interfaces.inc");
- global $config, $g;
-
- mwexec("/usr/bin/killall ftpsesame", true);
-
- /* if list */
- $iflist = get_configured_interface_list();
-
- /* loop through all interfaces and handle ftp-proxy */
- $interface_counter = 0;
- foreach ($iflist as $ifent => $ifname) {
-
- if(interface_has_gateway($ifname)) {
- $interface_counter++;
- continue;
- }
- /* if the ftp proxy is disabled for this interface then kill ftp-proxy
- * instance and continue. note that the helpers for port forwards are
- * launched in a different sequence so we are filtering them out
- * here by not including -c {$port} -g 8021 first.
- */
-
- /* Get the ftp queue for this interface */
- if (isset($config['shaper'][$ifname]['ftpqueue']))
- $shaper_queue = $config['interfaces'][$ifname]['ftpqueue'];
-
- $port = 8021 + $interface_counter;
- if(isset($config['interfaces'][$ifname]['disableftpproxy'])) {
- /* item is disabled. lets ++ the interface counter and
- * keep processing interfaces. kill ftp-proxy if already
- * running for this instance.
- */
- if($g['debug'])
- log_error("Config: FTP proxy disabled for interface {$ifent}");
-
- $helpers = array();
- exec("/bin/ps awwux | /usr/bin/grep \"[/]ftp-proxy\" | /usr/bin/grep \"{$port}\" | /usr/bin/awk '{ print $2 }'", $helpers);
- if(count($helpers > 0)) {
- mwexec("/bin/kill {$helpers[0]}");
- }
- $interface_counter++;
- } else {
- /* grab the current interface IP address */
- $int = convert_friendly_interface_to_real_interface_name($ifname);
- $ip = find_interface_ip($int);
- /* are we in routed mode? no source nat rules and not a outside interface? */
- /* If we have advanced outbound nat we skip the FTP proxy, we use ftpsesame */
- if((isset($config['nat']['advancedoutbound']['enable'])) && (! interface_has_gateway($ifname))) {
- $sourcenat = 0;
- /* we are using advanced outbound nat, are we in routing mode? */
- /* if the interface address lies within a outbound NAT source network we should skip */
- if(! empty($config['nat']['advancedoutbound']['rule'])) {
- foreach($config['nat']['advancedoutbound']['rule'] as $natnetwork) {
- if(ip_in_subnet($ip, $natnetwork['source']['network'])) {
- /* if the interface address is matched in the AON Rule we need the ftp proxy */
- if(is_ipaddr($natnetwork['target']) && ($natnetwork['interface'] == "wan")) {
- $pftpxsourceaddr = "-a {$natnetwork['target']}";
- if($g['debug'])
- log_error("Config: AON: using the external ip source {$pftpxsourceaddr} for the ftp proxy");
- }
- $sourcenat++;
- }
- }
- }
- if($sourcenat == 0) {
- if($g['debug'])
- log_error("Config: No AON rule matched for interface {$ifname} - not using FTP proxy");
- mwexec("/usr/local/sbin/ftpsesame -i $int");
- $interface_counter++;
- continue;
- } else {
- if($g['debug'])
- log_error("Config: AON rule matched for interface {$ifname} - using FTP proxy");
- }
- }
- /* if ftp-proxy is already running then do not launch it again */
- if($g['debug']) {
- log_error("Config: FTP proxy port ($port) enabled for interface {$ifname}");
- }
- $helpers = array();
- exec("/bin/ps awwux | /usr/bin/grep \"[/]ftp-proxy\" | /usr/bin/grep \"{$port}\" | /usr/bin/grep \"{$pftpxsourceaddr}\" | /usr/bin/awk '{ print $2 }'", $helpers);
- if(!$helpers && $ip)
- mwexec("/usr/local/sbin/ftp-proxy {$shaper_queue} -p {$port} {$pftpxsourceaddr} {$ip} -T PFFTPPROXY");
- if(!$ip)
- mwexec("/usr/local/sbin/ftpsesame {$shaper_queue} -i $int");
- $interface_counter++;
- }
- }
- /* support bridged interfaces. even they need ftp mojo */
- if (is_array($config['bridges']['bridged']))
- foreach($config['bridges']['bridged'] as $bridge)
- mwexec("/usr/local/sbin/ftpsesame {$shaper_queue} -i {$bridge['bridgeif']}");
-}
-
function cleanup_backupcache($revisions = 30) {
global $g;
$i = false;
@@ -1463,4 +1368,4 @@ function set_device_perms() {
if($g['booting']) echo ".";
$config = parse_config();
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud