| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
.. for the `#else` (`!HAVE_GETSOCKNAME`) case
Fixes https://github.com/curl/curl/issues/6548
Closes #6549
Signed-off-by: Layla <layla@insightfulvr.com>
|
|
|
|
| |
Closes #6534
|
|
|
|
|
|
|
| |
As the info is already stored in the transfer handle anyway, there's no
need to carry around a duplicate buffer for the life-time of the handle.
Closes #6534
|
|
|
|
|
|
|
|
| |
... and use 'int' for ports. We don't use 'unsigned short' since -1 is
still often used internally to signify "unknown value" and 0 - 65535 are
all valid port numbers.
Closes #6534
|
|
|
|
|
|
| |
... as the numerical IP address is already stored and kept in 'primary_ip'.
Closes #6534
|
|
|
|
|
|
|
| |
This also moves the 'async' struct from the connectdata struct into the
Curl_easy struct, which seems like a better home for it.
Closes #6497
|
|
|
|
| |
Closes #6485
|
|
|
|
| |
Closes #6479
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... in most cases instead of 'struct connectdata *' but in some cases in
addition to.
- We mostly operate on transfers and not connections.
- We need the transfer handle to log, store data and more. Everything in
libcurl is driven by a transfer (the CURL * in the public API).
- This work clarifies and separates the transfers from the connections
better.
- We should avoid "conn->data". Since individual connections can be used
by many transfers when multiplexing, making sure that conn->data
points to the current and correct transfer at all times is difficult
and has been notoriously error-prone over the years. The goal is to
ultimately remove the conn->data pointer for this reason.
Closes #6425
|
|
|
|
|
|
| |
Pointed out by Coverity
Closes #6431
|
|
|
|
|
|
|
|
|
|
|
|
| |
The linux kernel does not report all ICMP errors back to userspace due
to historical reasons.
IP*_RECVERR sockopt must be turned on to have the correct behaviour
which is to pass all ICMP errors to userspace.
See https://bugzilla.kernel.org/show_bug.cgi?id=202355
Closes #6341
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If supported, defer port selection until connect() time
if --interface is given and source port is 0.
Reproducer:
* start fast webserver on port 80
* starve system of ephemeral ports
$ sysctl net.ipv4.ip_local_port_range="60990 60999"
* start a curl/libcurl "crawler"
$curl --keepalive --parallel --parallel-immediate --head --interface
127.0.0.2 "http://127.0.0.[1-254]/file[001-002].txt"
current result:
(possible some successful data)
curl: (45) bind failed with errno 98: Address already in use
result after patch:
(complete success or few connections failing, higlhy depending on load)
Fail only when all the possible 4-tuple combinations are exhausted,
which is impossible to do when port is selected at bind() time becuse
the kernel does not know if socket will be listen()'ed on or connect'ed
yet.
Closes #6295
|
|
|
|
|
|
|
|
|
|
|
|
| |
Valgrind will complain that ssrem buffer usage if not explicit
initialized, hence initialize it to zero.
This completes the change intially started in commit 2c0d7212151 ('ftp:
retry getpeername for FTP with TCP_FASTOPEN') where the ssloc buffer has
a similar memset to zero.
Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
Closes #6289
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case of TFO, the remote host name is not resolved at the
connetion time.
For FTP that has lead to missing hostname for the secondary connection.
Therefore the name resolution is done at the time, when FTP requires it.
Fixes #6252
Closes #6265
Closes #6282
|
|
|
|
| |
Closes #6172
|
|
|
|
|
|
|
|
| |
Assisted-by: Daniel Stenberg
Reported-by: Tom G. Christensen
Fixes https://github.com/curl/curl/issues/6069
Closes https://github.com/curl/curl/pull/6071
|
|
|
|
|
|
|
|
|
| |
The OS is deprecated. I see no traces of anyone having actually built
curl for Symbian after 2012.
The public headers are unmodified.
Closes #5989
|
|
|
|
| |
Closes #5912
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting a timeout to INT_MAX could cause an immediate error to get
returned as timeout because of an overflow when different values of
'now' were used.
This is primarily fixed by having Curl_pgrsTime() return the "now" when
TIMER_STARTSINGLE is set so that the parent function will continue using
that time.
Reported-by: Ionuț-Francisc Oancea
Fixes #5583
Closes #5847
|
|
|
|
|
|
|
|
|
|
|
|
| |
Failures clearly returned from a (SOCKS) proxy now causes this return
code. Previously the situation was not very clear as what would be
returned and when.
In addition: when this error code is returned, an application can use
CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then
returns a value from the new 'CURLproxycode' enum.
Closes #5770
|
|
|
|
|
|
|
|
|
| |
CVE-2020-8231
Bug: https://curl.haxx.se/docs/CVE-2020-8231.html
Reported-by: Marc Aldorasi
Closes #5824
|
|
|
|
| |
Closes https://github.com/curl/curl/pull/5754
|
|
|
|
|
|
| |
Reviewed-by: Daniel Stenberg
Closes #5708
|
|
|
|
|
|
|
|
| |
For QUIC but also for regular TCP when the second family runs out of IPs
with a failure while the first family is still trying to connect.
Separated the timeout handling for IPv4 and IPv6 connections when they
both have a number of addresses to iterate over.
|
|
|
|
|
|
| |
Added build to travis to verify
Closes #5466
|
|
|
|
|
|
| |
And remove a few unused booleans!
Closes #5461
|
|
|
|
|
|
|
|
|
| |
It was not used much anyway and instead we let it store a blank buffer
in case of failure.
Reported-by: MonocleAI
Fixes #5411
Closes #5418
|
|
|
|
|
|
|
|
|
|
|
| |
- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public headers and examples
- Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
typedef different types/structs depending on build conditions.
Closes #5338
|
|
|
|
|
|
| |
Follow-up from dbd16c3e256c6c (regression in 7.70.0)
Closes #5334
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Document in Curl_timeleft's comment block that returning 0 signals no
timeout (ie there's infinite time left).
- Fix SOCKS' Curl_blockread_all for the case when no timeout was set.
Prior to this change if the timeout had a value of 0 and that was passed
to SOCKET_READABLE it would return right away instead of blocking. That
was likely because it was not well understood that when Curl_timeleft
returns 0 it is not a timeout of 0 ms but actually means no timeout.
Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360
Closes https://github.com/curl/curl/pull/5220
|
|
|
|
|
|
|
|
|
| |
Restores the --head functionality to the curl utility which extracts
'protocol' that is stored that way.
Reported-by: James Fuller
Fixes #5196
Closes #5198
|
|
|
|
|
|
|
|
| |
The counter was not bumped in all cases correctly.
Reported-by: Marcel Raad
Ref: #5131
Closes #5135
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure each separate index in connn->tempaddr[] is used for a fixed
family (and only that family) during the connection process.
If family one takes a long time and family two fails immediately, the
previous logic could misbehave and retry the same family two address
repeatedly.
Reported-by: Paul Vixie
Reported-by: Jay Satiro
Fixes #5083
Fixes #4954
Closes #5089
|
|
|
|
|
|
|
| |
As they were added primarily for debugging, they provide little use for
users.
Closes #4951
|
|
|
|
|
|
| |
Removes two entries from KNOWN_BUGS.
Closes #4907
|
|
|
|
|
|
|
| |
This was an array indexed with sockindex but it was only ever used for
the secondary socket.
Closes #4929
|
|
|
|
| |
Closes https://github.com/curl/curl/pull/4775
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ngtcp2 QUIC backend was using the MSG_DONTWAIT flag for send/recv
in order to perform nonblocking operations. On Windows this flag does
not exist. Instead, the socket must be set to nonblocking mode via
ioctlsocket.
This change sets the nonblocking flag on UDP sockets used for QUIC on
all platforms so the use of MSG_DONTWAIT is not needed.
Fixes #4531
Closes #4532
|
|
|
|
|
|
|
| |
With MinGW-w64 using WinSock, `curl_socklen_t` is signed, while the
result of `sizeof` is unsigned.
Closes https://github.com/curl/curl/pull/4483
|
|
|
|
|
|
|
|
|
|
|
| |
Previosly all connect() failures would return CURLE_COULDNT_CONNECT, no
matter what errno said.
This makes for example --retry work on these transfer failures.
Reported-by: Nathaniel J. Smith
Fixes #4461
Clsoes #4462
|
|
|
|
| |
Closes #4289
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the function to figure out if a unix domain socket has a
file name or not associated with it! When a socket is created with
socketpair(), as done in the fuzzer testing, the path struct member is
uninitialized and must not be accessed.
Bug: https://crbug.com/oss-fuzz/16699
Closes #4283
|
| |
|
| |
|
|
|
|
| |
Closes #4204
|
|
|
|
|
|
|
| |
... to make it hold microseconds too.
Fixes #4165
Closes #4168
|
|
|
|
|
|
|
|
|
| |
USe configure --with-ngtcp2 or --with-quiche
Using either option will enable a HTTP3 build.
Co-authored-by: Alessandro Ghedini <alessandro@ghedini.me>
Closes #3500
|
|
|
|
|
|
| |
Reported-by: Alex Grebenschikov
Fixes #3993
Closes #4002
|
|
|
|
|
|
|
|
|
|
| |
When compiling without getpeername() or getsockname(), the sockfd
paramter to Curl_udpateconninfo() became unused after commit e91e481612
added ifdef guards.
Closes #3910
Fixes https://curl.haxx.se/dev/log.cgi?id=20190520172441-32196
Reviewed-by: Marcel Raad, Daniel Stenberg
|