| Ticket UUID: | b41b6f76b045c932e10f2504295cf98606835663 | |||
| Title: | No IPv6 support for FTP | |||
| Type: | Bug | Version: | 8.6 | |
| Submitter: | anonymous | Created on: | 2014-08-11 13:15:42 | |
| Subsystem: | ftp | Assigned To: | aku | |
| Priority: | 5 Medium | Severity: | Critical | |
| Status: | Open | Last Modified: | 2014-12-03 00:41:01 | |
| Resolution: | None | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
Hello, There is no IPv6 support for FTP package available in TCL standard library. requesting you to add the support ASAP. Thank you. | |||
| User Comments: |
aku added on 2014-12-03 00:41:01:
And with a bit more time some initial work on EPSV support. The relevant commit is [eb27679053], again made on the branch "ak-tkt-b41b6f76b0-ftp-eprt". Please retrieve that commit and test the EPSV support. Any problems should be reported in this ticket. aku added on 2014-12-02 22:05:59: I managed to make a bit of time now and believe I managed to add EPRT support. No EPSV support yet. The code has been committed to branch "ak-tkt-b41b6f76b0-ftp-eprt". The current commit on that branch is [ad53730d6b]. Please get yourself these sources (ftp version is 2.5, on that branch), and test if they work for your case. aku added on 2014-12-02 19:29:14: Sorry, no updates. To much distraction from work so far. anonymous added on 2014-12-02 04:42:02: Any update...? anonymous added on 2014-09-05 07:02:59: Could you let me know what is your next step, I mean are you people going to add EPRT and EPSV commands support to the ftp library in 8.6 itself? aku added on 2014-09-05 04:32:02: > I have gone through the attached ftp.tcl code. > Here I found that, this code does not support > EPRT or EPSV commands. Please correct me if I > am wrong. My apologies for not being clear enough in my comments. Yes, the code does not support EPRT/EPSV. My comments regarding the ip package were thoughts and musings on what changes will have to be made to add such support. aku added on 2014-09-02 19:31:22: > Could you let me know how you have used "ip" > commands to detect use of IPv6 addresses? While I have not done any coding yet the general idea is to use ip::version on the IP address of the client itself. Depending on the result, either 4 or 6 it should then be possible to have the code doing data connection handling use either PORT or EPRT commands to communicate that address to the server. anonymous added on 2014-09-02 11:01:36: FYI http://www.juniper.net/documentation/en_US/junos12.1x46/topics/concept/security-alg-ftp-commands.html anonymous added on 2014-09-02 07:01:59: Thank you very much for your help.
AKU:
Is there something in the responses coming from XLight which would allow the FTP package to automatically recognize the need/support for the EPRT command ?
ANSWER:
This morning I tried windows ftp client over IPv6. Below is the response I got from XlightFtp server:
09/02/2014 12:05:15 (vijay ::1-->[::1]:21) "EPRT |2|::1|58404|"
Could you let me know how you have used "ip" commands to detect use of IPv6 addresses?
aku added on 2014-08-29 22:13:19: Having a second look, I should be able to use the "ip" commands to detect use of IPv6 addresses and use that information to automatically activate use of EPRT/EPSV. No user intervention required. aku added on 2014-08-29 19:35:52: Ok, reading
> (anonymous ::1<--[::1]:21)
> "425 PORT doesn't support ipv6 address, use EPRT for ipv6"
it seems to me that the Xlight server expects that the PORT command contains only IPv4 addresses and that IPv6 addresses should be requested via EPRT. Even if it can recognize an IPv6 address in PORT.
So what we have here is not a low-level IPv6 issue (as I thought initially), but an issue at the level of the FTP protocol itself.
Searching a bit the relevant RFC seems to be
http://tools.ietf.org/html/rfc2428
Is there something in the responses coming from XLight which would allow the FTP package to automatically recognize the need/support for the EPRT command ?
As an extension of the ftp protocol the package cannot really assume that everybody understands EPRT/EPSV now. Of course, in the worst case use of either PORT or EPRT can be made into an option we can set on an ftp session.
anonymous added on 2014-08-26 05:19:21: I am running Xlight FTP server over IPv6.
Here Is the FTP-client using TCL's FTP library:
-----------------------------------------------
package require ftp
set server_ip "::1"
set usernm "anonymous"
set passwd "anonymous"
set ::ftp::VERBOSE 1
set ::ftp::DEBUG 0
#Defining Callbacks
proc Hash {total} {
puts -nonewline "#"
}
proc ServerReply {id msg state} {
puts $msg
}
# open a new connection
set ftp_id [::ftp::Open $server_ip $usernm $passwd -timeout 20 -mode active -output ServerReply -progress Hash]
#########
# Till Here everything is going fine. But I am getting error with the below line of code.
# Below is the Error I'm getting:
#08/26/2014 10:46:58 (anonymous ::1<--[::1]:21) "425 PORT doesn't support ipv6 address, use EPRT for ipv6"
#########
::ftp::Get $ftp_id 100MB_file
::ftp::Close $ftp_id
aku added on 2014-08-25 16:23:14: Received in direct mail to me, instead of commenting here... > I am using TCL8.6 > Regards, Vijay Ok. Since Tcl 8.6 the socket command was extended to support IPv6 and I would expect that this automatically conveys IPv6 ability to packages built on top of that, like Tcllib's ftp package. In other words, the ability to use IPv6 comes out of the Tcl core in use, and not the ftp package. And the core you are using does support IPv6. Given your experience to the contrary I now need more information to reproduce your issue. The best would be if you were to attach a script here (to the ticket) which demonstrates the problem you are seeing. aku added on 2014-08-11 17:23:47: Which version of Tcl are you using FTP with ? | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki