Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1724679 ] curl cannot bind address when using --local-port

From: <>
Date: Mon, 28 May 2007 00:54:27 -0700

Bugs item #1724679, was opened at 2007-05-24 10:52
Message generated for change (Settings changed) made by bagder
You can respond by visiting:

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: http
Group: bad behaviour
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: mytx (mytx)
Assigned to: Daniel Stenberg (bagder)
Summary: curl cannot bind address when using --local-port

Initial Comment:
When using local-port to specify local port, the first connection correctly, but the second connection cannot bind address.
Such as:
$ curl http://httpserver/page --local-port 10000
then get right page, but run it again:
$ curl http://httpserver/page --local-port 10000
curl: (7) bind failure: Address already in use

Using curl version: v7.16.2
OS: linux
kernel: Linux version 2.6.18-gentoo-r2 (****) (gcc version 4.1.1 (Gentoo 4.1.1-r1)) #3 SMP Wed Jan 10 10:23:42 CST 2007

More information:
$ curl -V
curl 7.16.2 (i686-pc-linux-gnu) libcurl/7.16.2 OpenSSL/0.9.8d zlib/1.2.3 libidn/0.6.5
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: IDN Largefile NTLM SSL libz


Comment By: Daniel Stenberg (bagder)
Date: 2007-05-24 22:46

Logged In: YES
Originator: NO

This is how the system works. A recently "binded" port cannot be used
again within a certain period of time.

Are you asking for SO_REUSEADDR to be used? I think that perhaps should
make sense and would then reduce this problem.


You can respond by visiting:
Received on 2007-05-28

These mail archives are generated by hypermail.

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

File upload with ASP.NET