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-3433968 ] Active FTP hangs if bind fails with

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sun, 06 Nov 2011 12:03:07 -0800

Bugs item #3433968, was opened at 2011-11-05 15:32
Message generated for change (Comment added) made by gseng
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3433968&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: hang
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gokhan Sengun (gseng)
Assigned to: Daniel Stenberg (bagder)
Summary: Active FTP hangs if bind fails with

Initial Comment:
In function ftp_state_use_port, address/port for data connection is bound with bind system call.

If bind fails with error EADDRNOTAVAIL, it fails forever and the running thread hangs there.

One expects to get a "PORT command failed" result after a few tries or trying all ports in the range and fail afterwards. Currently port is set to port_min and loop continues.

Is there a good reason to set the port to port_min and continue?

Running official curl 7.22.0 on a linux box.

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

>Comment By: Gokhan Sengun (gseng)
Date: 2011-11-06 12:03

Message:
Hi Daniel,

Proposed fix works equally well for my test case.

Thanks!!

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

Comment By: Daniel Stenberg (bagder)
Date: 2011-11-06 07:57

Message:
My first suggestion was a bit too simple though and broke for example test
case 116. Try this slightly different approach and see if it still makes
your original bug report case work.

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

Comment By: Gokhan Sengun (gseng)
Date: 2011-11-05 16:02

Message:
Suggested change seems to work for me.

Thanks for the help!

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

Comment By: Daniel Stenberg (bagder)
Date: 2011-11-05 15:36

Message:
I agree with you that those two lines look like an error to me.

Does it work for you if you remove these two lines?

        port = port_min;
        continue;

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

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

These mail archives are generated by hypermail.

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

File upload with ASP.NET