Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 15932 invoked from network); 12 Jul 2010 12:29:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Jul 2010 12:29:48 -0000 Received: (qmail 74621 invoked by uid 500); 12 Jul 2010 12:29:48 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 74239 invoked by uid 500); 12 Jul 2010 12:29:45 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 74231 invoked by uid 99); 12 Jul 2010 12:29:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 12:29:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 12:29:41 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6CCLocn006131 for ; Mon, 12 Jul 2010 12:21:50 GMT Message-ID: <6510040.324641278937310055.JavaMail.jira@thor> Date: Mon, 12 Jul 2010 08:21:50 -0400 (EDT) From: "Felix Bolte (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (NET-313) FTP: EPRT fails + EPRT/EPSV issues In-Reply-To: <938076874.486381269515787213.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887357#action_12887357 ] Felix Bolte commented on NET-313: --------------------------------- hi sebb, you are right, as EPRT could have disadvantages on IPv4, EPSV could have them too ... default to PASV is ok please go ahead ... an option to enable EPSV as default sounds fine to me > FTP: EPRT fails + EPRT/EPSV issues > ---------------------------------- > > Key: NET-313 > URL: https://issues.apache.org/jira/browse/NET-313 > Project: Commons Net > Issue Type: Bug > Components: FTP > Affects Versions: 2.1 > Environment: FTP server = vsftpd/Centos 5.4 > FTPClient = commons-net (FTPClient) ;) > Network = IPv4 > Reporter: Felix Bolte > Attachments: ftp_nat.patch > > > as implemented in NET-288, the client can work now via IPv6 ... EPSV is not only useful on IPv6 but also when NAT is enabled (see [RFC 2428|http://tools.ietf.org/html/rfc2428]) > what my patch does: > * (re)enable EPSV command on IPv4 too (i dont know why [~rwinston@eircom.net] removed it from the supplied patch in NET-288), also see my comments in patch > * sending EPRT only if we are over IPv6, cause there is no advantage over PORT on IPv4, it could even have disadvantages (see comments in patch) > * EPRT was sending the result of getActivePort() to the server, but when there was no activePortRange set, it did send 0 as default which leads to an error on server site: > {quote} > Tue Mar 23 17:17:20 2010 [pid 10581] [ftpuser] FTP command: Client "192.168.11.130", "EPRT |1|192.168.11.130|0|" > Tue Mar 23 17:17:20 2010 [pid 10581] [ftpuser] FTP response: Client "192.168.11.130", "500 Illegal EPRT command." > {quote} > * and even calling getActivePort() has no sense here, cause that port is used to be random, but we should send same port where the ServerSocket is listening on -> server.getLocalPort() > * getActivePort() checks if __activeMaxPort > __activeMinPort, but when i want to set a range of only one single port (min==max) it would return 0 ... now it will check if equal and return __activeMaxPort -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.