cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3421912 ] unable to force PORT usage, --disable-eprt ineffective

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 11 Oct 2011 14:31:06 -0500

Bugs item #3421912, was opened at 2011-10-11 14:31
Message generated for change (Tracker Item Submitted) made by tshinnic
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3421912&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ftp
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas L. Shinnick (tshinnic)
Assigned to: Daniel Stenberg (bagder)
Summary: unable to force PORT usage, --disable-eprt ineffective

Initial Comment:
Unintended consequences? Or malevolent sense of humor?

After a couple hours of "but the documentation says --disable-eprt will force use of PORT in FTP sessions" and searching the web and experimentation, I grabbed the source. *Very* disappointed to find

  /home/Tom/temp/curl-7.22.0/lib/ftp.c
   961 #ifdef ENABLE_IPV6
   962 if(!conn->bits.ftp_use_eprt && conn->bits.ipv6)
   963 /* EPRT is disabled but we are connected to a IPv6 host, so we ignore the
   964 request and enable EPRT again! */
   965 conn->bits.ftp_use_eprt = TRUE;
   966 #endif

curl currently will ignore any explicit command line option to the contrary and use EPRT if connecting to an ipv6-enabled host. Connecting to a defaulted modern Linux will find both ipv4 and ipv6 enabled. It is impossible to force use of PORT using the identified options.

Well, unless you *also* specify the -4 option to first force ipv4 usage. That is,

      ./curl --verbose --ftp-port - --disable-eprt --list-only ftp://Tom:@localhost:2121/

will still use EPRT, not PORT, but

    ./curl --verbose -4 --ftp-port - --disable-eprt --list-only ftp://Tom:@localhost:2121/

will work to force use of PORT.

If a user says --disable-foo how can it ever be appropriate to 'foo' ? In this case, the association between EPRT and ipv6 _should_ have been interpreted to mean that ipv6 should have been disabled also. Or so it would seem...

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3421912&group_id=976
Received on 2011-10-11

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET